Andrew's Digital Garden

Scaling stroke width in SVGs

By default, the stroke width of SVGs scale with the size and transformations of the SVG. This can be disabled using vector-effect: non-scaling-stroke.

vector-effect can be applied as an [[html]] attribute, or a [[css]] declaration.

https://www.stefanjudis.com/today-i-learned/how-to-disable-scaling-for-stroke-width/ https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/vector-effect

[[design]] [[svg]]

Scaling stroke width in SVGs