Last active
October 20, 2020 07:39
-
-
Save goiblas/65ae5cf7b9c510171706add6885c49d7 to your computer and use it in GitHub Desktop.
:focus-visible
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
/* Sin soporte, mantenemos ouline */ | |
:focus{ | |
outline: 5px solid green; | |
} | |
/* Con suporte, eliminamos ouline cuando no sea estrictamente necesario */ | |
:focus:not(:focus-visible) { | |
outline: 0; | |
} | |
/* Con soporte, añadimos ouline solo cuando el navegador lo considere necesario */ | |
:focus-visible { | |
outline: 5px solid green; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment