Skip to content

Instantly share code, notes, and snippets.

@ediblecode
Created February 3, 2021 16:06
Progressively enhanced focus visible CSS
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