Hide the annoying outline for mouse users but preserves it for keyboard users
CSS that get’s 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.
:focus:not(:focus-visible) { outline: none }
Source @LeaVerou