1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00
Files
svgo/test/plugins/removeViewBox.05.svg
2021-03-06 13:39:31 +03:00

30 lines
1.2 KiB
XML

ViewBox in nested <svg> should be preserved to not break scale
===
<svg width="480" height="360" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<svg id="svg-sub-root" viewBox="0 0 450 450" width="450" height="450">
<rect x="225" y="0" width="220" height="220" style="fill:magenta"/>
<rect x="0" y="225" width="220" height="220" style="fill:#f0f"/>
<rect x="225" y="225" width="220" height="220" fill="#f0f"/>
</svg>
</defs>
<use x="60" y="50" width="240" height="240" xlink:href="#svg-sub-root"/>
<rect x="300" y="170" width="118" height="118" fill="magenta"/>
</svg>
@@@
<svg width="480" height="360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<svg id="svg-sub-root" viewBox="0 0 450 450" width="450" height="450">
<rect x="225" y="0" width="220" height="220" style="fill:magenta"/>
<rect x="0" y="225" width="220" height="220" style="fill:#f0f"/>
<rect x="225" y="225" width="220" height="220" fill="#f0f"/>
</svg>
</defs>
<use x="60" y="50" width="240" height="240" xlink:href="#svg-sub-root"/>
<rect x="300" y="170" width="118" height="118" fill="magenta"/>
</svg>