outline
A shorthand property for setting the width, style, and color of an element's outline. Outlines are drawn outside the border edge and don't take up space.
It is documented as part of the CSS Basic User Interface specification.
Syntax
/* Usage Example */
button:focus-visible {
outline: 3px solid var(--accent);
outline-offset: 4px;
/* accessible focus style that doesn't trigger layout shifts */
}
/* Syntax */
outline: outline-width;
outline: outline-style;
outline: outline-color;
/* Global values */
outline: inherit;
outline: initial;
outline: revert;
outline: revert-layer;
outline: unset;
outline Browser support
Widely available
Since
2023 94% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.
94+
88+
16.4+
94+