coderef

OutlinesBaseline · Widely available

The outline-color, outline-style, and outline-width and outline-offset CSS properties style a line around an element, outside of the border.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 5, 2017. Widely available since Oct 5, 2019.

Browser support

DesktopChrome
1+Supportedsince Dec 11, 2008
Current: 155
Edge
12–14Not supported
15+Supportedsince Apr 5, 2017
Current: 154
Firefox
1–1Not supported
1.5+Supportedsince Nov 29, 2005
Current: 157
Safari
1–1.1Not supported
1.2+Supportedsince Feb 2, 2004
Current: 27
MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155
Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157
Safari iOS
1+Supportedsince Jun 29, 2007
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: outline-color.

Feature detection

CSS · check before using
@supports (outline-color: initial) {
  /* styles that rely on outline-color */
}

/* or in JavaScript */
if (CSS.supports("outline-color", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (18). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
outline-color1121.51.21841
outline-color.transparent1121.51.21841
outline-offset1151.51.21841
outline-style1121.51.21841
outline-style.auto1121.51.21841
outline-style.dashed1121.51.21841
outline-style.dotted1121.51.21841
outline-style.double1121.51.21841
outline-style.groove1121.51.21841
outline-style.inset1121.51.21841
outline-style.none1121.51.21841
outline-style.outset1121.51.21841
outline-style.ridge1121.51.21841
outline-style.solid1121.51.21841
outline-width1121.51.21841
outline-width.medium1121.51.21841
outline-width.thick1121.51.21841
outline-width.thin1121.51.21841