Stroke

Compare how an icon stroke scales against a fixed CSS-pixel stroke.

Scaling stroke

Scaling stroke at 16pxScaling stroke at 20pxScaling stroke at 24pxScaling stroke at 32pxScaling stroke at 48px

Non-scaling stroke

Fixed stroke at 16pxFixed stroke at 20pxFixed stroke at 24pxFixed stroke at 32pxFixed stroke at 48px

Non-scaling SVG

Built-in exemplar

Scaling SVG

Example CSS size

Both examples use one 24 × 24 viewBox. vector-effect keeps the second stroke in CSS pixels.

What it measures

This comparison renders the same exemplar at five display sizes. One SVG scales its stroke with the geometry; the other keeps the stroke width fixed in display pixels.

How it is computed

Both exports use a 24 × 24 viewBox. The fixed version applies vector-effect: non-scaling-stroke to the path. That changes stroke painting without changing the path coordinates.

When to use it

Use a scaling stroke when an icon should grow proportionally. Use a non-scaling stroke when several display sizes should retain the same apparent line width. Verify the result at its intended rendered sizes.

Grid shows the keylines. Optical adjusts the same exemplar’s visual position and scale.