Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexdiliberto/a300916f18b0e9367092f9b417c673a2 to your computer and use it in GitHub Desktop.
Save alexdiliberto/a300916f18b0e9367092f9b417c673a2 to your computer and use it in GitHub Desktop.

I’m gonna start blanket adding the following rule to all my stylesheets:

:focus:not(:focus-visible) { outline: none }

Gets rid of the annoying outline for mouse users but preserves it for keyboard users, and is ignored by browsers that don’t support :focus-visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment