outline vs border Playground

Three cloths on Mrs. Lastri’s frame and a ring on cloth 2 when hovered or tabbed: border, outline or box-shadow, and the sizes the browser measures show which…

Why it matters

This choice decides whether a UI "jumps" on hover or focus. And the focus ring is the only guide for keyboard users: outline: none with no replacement leaves them lost, one of the most common accessibility bugs.

The key idea

border counts in the box, outline is painted outside it

Common mistakes

Try it in this playground