Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-transforms/transform-box/svgbox-stroke-box-003.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>transform-box: stroke-box, stroke with vector-effect: non-scaling-stroke</title>
<link rel="author" title="Jonathan Watt" href="mailto:jwatt@jwatt.org">
<link rel="match" href="reference/svgbox-rect-ref.html">
<meta name="assert" content="The used value of transform-box is fill-box on SVG with non-scaling-stroke"/>
<style>
#target {
fill: green;
stroke: black;
stroke-width: 20;
vector-effect: non-scaling-stroke;
transform-box: stroke-box;
transform: scale(0.5) translateY(-100%);
}
</style>
<svg width="400" height="300">
<rect id="target" width="100" height="200" x="50" y="180"/>
</svg>