property
Vector effect — CSS reference
Keeps the stroke outline thickness from scaling with the SVG geometry transform in this example. The shape is doubled by its transform, but its 10-unit stroke remains ten viewport pixels wide.
Formal Syntax & Structure
css syntaxcss
vector-effect: non-scaling-stroke;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>vector-effect</title><style>body{margin:0;background:white}svg{display:block}#a{vector-effect:non-scaling-stroke}</style><body><svg xmlns="http://www.w3.org/2000/svg" width="240" height="160" viewBox="0 0 240 160" role="img" aria-label="SVG styling example"><g transform="scale(2)"><path id="a" d="M20 40 H90" fill="none" stroke="red" stroke-width="10"/></g></svg></body></html>