stroke-width

Sets the thickness of the border (stroke) on SVG shapes or text. It can be defined in pixels, percentages, or other standard CSS units.

It is documented as part of the Scalable Vector Graphics specification.

/* Usage Example */
circle.outer-ring {
  /* Sets a 4px thick border for the SVG circle */
  stroke-width: 4px;
}

/* Global values */
stroke-width: inherit;
stroke-width: initial;
stroke-width: revert;
stroke-width: revert-layer;
stroke-width: unset;
Widely available Since 2020 96% global usage

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

1+
1.5+
4+
15+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC