coderef

Text stroke and fill (compatibility prefixes)Baseline · Widely available

The -webkit-text-stroke-width and -webkit-text-stroke-color CSS properties set the thickness and color of text outlines. The -webkit-text-fill-color sets the color within text character outlines. Both default to the text color.

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–3Not supported
4+Supportedsince Jan 25, 2010
Current: 155
Edge
12–14Not supported
15+Supportedsince Apr 5, 2017
Current: 154
Firefox
1–48Not supported
49+Supportedsince Sep 20, 2016
Current: 157
Safari
1–2Not supported
3+Supportedsince Oct 26, 2007
Current: 27
MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155
Firefox Android
4–48Not supported
49+Supportedsince Sep 20, 2016
Current: 157
Safari iOS
1–1Not supported
2+Supportedsince Jul 11, 2008
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: -webkit-text-fill-color.

Feature detection

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

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

Sub-features

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

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
-webkit-text-fill-color11249318492
-webkit-text-stroke41549318492
-webkit-text-stroke-color11549318492
-webkit-text-stroke-width11549318492