stroke-color

An experimental property (mainly supported in Safari) that allows you to set the color of an SVG path or text stroke using standard CSS color values.

Quick example

.map-boundary {
  /* Sets the border (stroke) color of an SVG shape */
  stroke-color: var(--brand-primary);
}

Quick facts

Initial value
transparent
Inherited
Yes
Applies to
text and SVG shapes
Animation type
byComputedValue

stroke-color Browser Support

Widely availableSince 202014% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

Safe to use without fallbacks.

1+
3+
3+
79+
ESC