Skip to content

wilddeer/focus-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published