--

Great article Håvard!

Couldn't you force the improved outline on all elements? Something like:

:focus {

outline: none !important;

box-shadow: 0 0 0 4px #cd4dcc !important;

border-color: transparent !important;

border-radius: 3px;

}

I'm not generally a fan of !important, but this would seem to be a code snippet you could throw on the end of an existing CSS file without having to debug individual :focus styles that might exist.

--

--

Dr. Derek Austin 🥳
Dr. Derek Austin 🥳

Written by Dr. Derek Austin 🥳

Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.

No responses yet