/* Keyword values */
vector-effect: none;
vector-effect: non-scaling-stroke;
/* Global values */
vector-effect: inherit;
vector-effect: initial;
vector-effect: revert;
vector-effect: revert-layer;
vector-effect: unset;`vector-effect` CSS property / notebook
`vector-effect` CSS property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100">
<g
transform="scale(2.3) rotate(23)"
transform-origin="100 50"
stroke-width="3"
stroke="orange"
fill="#ddeeff88">
<rect x=" 60" y="20" width="30" height="60" />
<rect x="110" y="20" width="30" height="60" class="thinned" />
</g>
</svg>svg {
width: 500px;
}
svg rect.thinned {
vector-effect: non-scaling-stroke;
}<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100">
<g
transform="rotate(23)"
transform-origin="100 50"
stroke-width="3"
stroke="orange"
fill="#ddeeff88">
<rect
x=" 60"
y="20"
width="30"
height="60"
transform-origin="100 50"
vector-effect="none" />
<rect
x="110"
y="20"
width="30"
height="60"
transform-origin="100 50"
vector-effect="none"
class="thinned" />
</g>
</svg>svg {
width: 500px;
}
svg rect {
transform: scale(2.3);
}
svg rect.thinned {
vector-effect: non-scaling-stroke;
}