stroke-width

Geoff Graham on Updated on
##description##
Ad
`, } ); } })();

The stroke-width property in CSS is for setting the width of a border on SVG shapes.

.module {
  stroke-width: 2;
}

Remember:

Values

The stroke-width property can accept any number, including whole numbers, decimals, and percentages:

Note that a unit identifier (i.e. px and em) are not required. A number without units is a value based on the coordinate system of the SVG viewBox. So, for example, 5 renders the same as 5% in a viewBox that is set to 0 0 100 100 (5/100 = .05 or 5%) but 10% in one that’s 0 0 50 50 (5/50 = .1 or 10%).

More Information

Browser Support