outline-style

Sets the style of the outline (like 'solid', 'dashed', or 'dotted'). It works exactly like 'border-style'.

It is documented as part of the CSS Basic User Interface specification.

/* Usage Example */
.debug-element {
  /* Draws a dashed outline for debugging without shifting the layout */
  outline-style: dashed;
  outline-width: 1px;
}

/* Syntax */
outline-style: auto;

/* Global values */
outline-style: inherit;
outline-style: initial;
outline-style: revert;
outline-style: revert-layer;
outline-style: unset;
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+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC