Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 441 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 441 Bytes

Focus fix

Adds is-mouse-focused class to clicked elements (and removes it after blur), so you can separate mouse/touch focus style and keyboard focus style.

/* keyboard focus style */
:focus {
  outline: 1px solid blue;
}

/* mouse/touch focus style */
:active,
.is-mouse-focused:focus {
    outline: none;
}

:active is required to prevent flickering.

CC0