Use this instead of :focus in your css

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

ShortIntermediateUI1 min

About this video

A short CSS lesson explaining the drawbacks of :focus and how :focus-visible can show focus styles only when they help keyboard users.

What you’ll learn

  • Explain why :focus can show unwanted focus rings on mouse clicks