CSS text stroke works through -webkit-text-stroke in Chrome 4+, Edge 15+, Firefox 49+, Safari 3.1+, Opera 15+, and Samsung Internet 4+. Learn syntax, use cases, issues.

Prince Dewani
May 6, 2026
CSS text stroke is a WebKit-originated CSS property that draws a colored outline along the edges of text characters. It works through the -webkit-text-stroke prefix in Chrome 4+, Edge 15+, Firefox 49+, Safari 3.1+ on macOS, Safari 4+ on iOS, Opera 15+, and Samsung Internet 4+, while Internet Explorer never supported the property.
This guide covers what CSS text stroke is, the browsers that support it, the syntax, the longhand properties, the use cases, and the known issues.
CSS text stroke is a CSS property that paints a colored outline along the edges of text characters. It is exposed through the -webkit-text-stroke prefix and is documented in the WHATWG Compatibility Standard. The property is a shorthand for -webkit-text-stroke-width and -webkit-text-stroke-color.
CSS text stroke has wide modern browser support through the -webkit- prefix on every Chromium-based browser, Firefox, and Safari. Internet Explorer is the only major browser that never shipped the property.
Chrome supports -webkit-text-stroke by default from Chrome 4 on Windows, macOS, Linux, ChromeOS, and Android. The property has shipped unchanged since the early Blink fork from WebKit, so every modern Chrome release renders the same stroke width and color across desktop and mobile.
Microsoft Edge supports -webkit-text-stroke by default from Edge 15 on Windows. Legacy EdgeHTML 12 to 14 did not support the property. Chromium-based Edge from Edge 79 onward inherits the Blink implementation, so the rendered stroke matches Chrome on every platform Edge ships on.
Firefox supports -webkit-text-stroke by default from Firefox 49 on Windows, macOS, Linux, and Android. Firefox 48 had it disabled by default behind the layout.css.prefixes.webkit preference, and Firefox 2 to 47 did not support the property. Firefox rounds the stroke corners while WebKit leaves them sharp, so the rendered shape on a heavy stroke can differ between Firefox and Safari.
Safari supports -webkit-text-stroke by default from Safari 3.1 on macOS and Safari 4 on iOS and iPadOS. WebKit was the first engine to ship the property, and Safari 3.2 on iOS had partial support before the iOS 4 release. Every Safari release on macOS and iOS still uses the same -webkit- prefixed form; there is no non-prefixed Safari path.
Opera supports -webkit-text-stroke by default from Opera 15 on desktop, which is the first Opera release built on the Blink engine. Presto-era Opera 9 to 12.1 did not support the property. Opera Mobile and Opera for Android share the Chromium codebase, so they inherit the same stroke rendering as Chrome on the matching version.
Samsung Internet supports -webkit-text-stroke by default from Samsung Internet 4 on Galaxy phones and tablets. The browser shares its rendering engine with Chrome on Android, so every Chromium-based release inherits the same stroke width handling and the same -webkit-text-fill-color interaction as the matching Chrome version.
Chrome for Android supports -webkit-text-stroke by default on every modern Chrome release, and Android WebView matches the system Chrome version. The legacy Android Browser 2.1 partially supported the property, Android Browser 3 did not support it, and Android Browser 4 onward shipped the WebKit implementation. Devices on Gingerbread through KitKat with the stock browser silently drop the rule.
Internet Explorer 5.5 through 11 do not support -webkit-text-stroke. Microsoft has retired Internet Explorer, and Trident never shipped any text-stroke implementation. Pages that must render an outline on IE should fall back to a four-direction text-shadow stack or render the headline as an SVG text element with a stroke attribute.
Note: CSS text stroke renders with sharp corners in WebKit and rounded corners in Firefox, and legacy Android Browser silently drops it. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
-webkit-text-stroke is a shorthand that takes a width and a color in either order, separated by a space. The property accepts the global keywords inherit, initial, revert, revert-layer, and unset, and inherits down the cascade like color and font.
/* Solid stroke around filled text */
.headline {
color: #1f2937;
-webkit-text-stroke: 2px #f97316;
}
/* Hollow display headline with transparent fill */
.hollow {
font-size: 6rem;
font-weight: 800;
-webkit-text-stroke: 3px #2563eb;
-webkit-text-fill-color: transparent;
}
/* Feature query gate with text-shadow fallback */
.outline {
text-shadow:
-1px -1px 0 #111,
1px -1px 0 #111,
-1px 1px 0 #111,
1px 1px 0 #111;
}
@supports (-webkit-text-stroke: 1px black) {
.outline {
text-shadow: none;
-webkit-text-stroke: 1px #111;
}
}-webkit-text-stroke is a shorthand for two longhand properties, and a third related property, -webkit-text-fill-color, controls the glyph interior. All three ship in the same browser versions as the shorthand.
| Property | Accepts | Role |
|---|---|---|
| -webkit-text-stroke-width | <length> (px, em, rem, thin, medium, thick). | Sets the thickness of the stroke around each glyph. |
| -webkit-text-stroke-color | <color> (named, hex, rgb, hsl, oklch, color-mix, currentColor). | Sets the stroke paint. Falls back to currentColor when omitted. |
| -webkit-text-stroke (shorthand) | <length> and <color> in any order. | Sets width and color in one declaration. |
| -webkit-text-fill-color | <color> including transparent. | Overrides the standard color property to control the glyph interior independently of the stroke. |
| Animatable longhands | -webkit-text-stroke-width and -webkit-text-stroke-color. | The shorthand itself is not animatable; transition the longhands to animate width and color. |
-webkit-text-stroke is most often used as a display-typography effect on hero headlines, where the stroke replaces or layers over the glyph fill. The patterns below all ship to production on landing pages, e-commerce banners, and editorial layouts.
-webkit-text-stroke ships in every modern browser, but the way each engine handles the corner shape, the stroke alignment, and the fallback path still trips up production builds.
In my experience, the failure that bites teams the most is the missing fallback, where a hollow headline with -webkit-text-fill-color: transparent ships without a paired text-shadow path, the QA pipeline tests Chrome and Firefox only, and a user on legacy Android Browser 3 or an old corporate IE 11 sees an invisible headline. Always gate the rule with @supports (-webkit-text-stroke: 1px black) or declare a text-shadow first, then override it inside the @supports block.
All CSS text stroke version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance