Created
August 24, 2017 18:05
-
-
Save meduzen/68af420431d8fca1e4523ccc8a2ba70d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Answer to https://twitter.com/stevepiron/status/900732215415508994 | |
* | |
* How can I not show the :focus style when clicking an element, but keep it for keyboard navigation? | |
*/ | |
// hover (mouse only) | |
:hover {} | |
// click (mouse only) | |
:active:hover {} | |
// focus (keyboard only) | |
:focus:not(:hover) {} | |
// click… or let’s say “Enter key” (keyboard only) | |
:active:not(:hover) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment