-webkit-text-stroke

A shorthand for setting both the thickness and the color of text outlines in one line. Great for creating 'hollow' or 'ghost' text effects.

h1 {
  -webkit-text-stroke: 2px #7c3aed;
  color: transparent;
  font-size: 5rem;
}
Initial value
See individual properties
Inherited
Yes
Applies to
allElements
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.

Safe to use without fallbacks.

4+
49+
3+
15+
ESC