Created
February 3, 2021 16:06
-
-
Save ediblecode/8a08d2857b9f0bd4eae367e1e4a7762e to your computer and use it in GitHub Desktop.
Progressively enhanced focus visible CSS
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
a, | |
button, | |
input { | |
&:focus { | |
/* More subtle style for older browsers */ | |
outline: 1px dashed black; | |
} | |
&:focus:not(:focus-visible) { | |
outline: none; | |
} | |
&:focus-visible { | |
outline: 4px dashed #fd0; | |
outline-offset: 2px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment