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: 155Edge
12–14Not supported
15+Supportedsince Apr 5, 2017
Current: 154Firefox
1–1Not supported
1.5+Supportedsince Nov 29, 2005
Current: 157Safari
1–1.1Not supported
1.2+Supportedsince Feb 2, 2004
Current: 27MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1+Supportedsince Jun 29, 2007
Current: 27How 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
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (18). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| outline-color | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-color.transparent | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-offset | 1 | 15 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.auto | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.dashed | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.dotted | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.double | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.groove | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.inset | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.none | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.outset | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.ridge | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-style.solid | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-width | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-width.medium | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-width.thick | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |
| outline-width.thin | 1 | 12 | 1.5 | 1.2 | 18 | 4 | 1 |