outline-offset
Adds space between the edge of the element and the outline. Positive values push the outline away, negative values pull it inside.
It is documented as part of the CSS Basic User Interface specification.
Syntax
/* Usage Example */
a:focus {
outline: 2px solid blue;
/* Adds a 4px gap between the link text and the outline */
outline-offset: 4px;
}
/* Global values */
outline-offset: inherit;
outline-offset: initial;
outline-offset: revert;
outline-offset: revert-layer;
outline-offset: unset;
outline-offset Browser support
Widely available
Since
2017 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2017.
1+
1.5+
1.2+
15+