Remove unused attributes from parent elements
This commit is contained in:
parent
cf5fb8a37d
commit
d9e3e2436b
7 changed files with 121 additions and 28 deletions
10
unittests/move-common-attributes-to-grandparent.svg
Normal file
10
unittests/move-common-attributes-to-grandparent.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="grampa" fill-opacity="0.4">
|
||||
<g stroke-opacity="0.8">
|
||||
<rect fill="#0F0" stroke="#0F0" stroke-width="5" width="100" height="300"/>
|
||||
<rect fill="#0F0" width="200" height="100" />
|
||||
</g>
|
||||
<circle fill="#0F0" stroke="0F0" cx="50" cy="50" r="20" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 367 B |
8
unittests/remove-unused-attributes-on-parent.svg
Normal file
8
unittests/remove-unused-attributes-on-parent.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#0F0" stroke="#000">
|
||||
<rect stroke="#0F0" stroke-width="5" width="100" height="300"/>
|
||||
<rect fill="#FFF" stroke="#000" width="200" height="100"/>
|
||||
<circle fill="#0F0" stroke="#0F0" cx="50" cy="50" r="20"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 327 B |
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="1.0000000" y="1.0000000">
|
||||
<rect x="123.4567" y="123.00" width="300.00001" height="1E+02" fill="lime" />
|
||||
<rect x="123.4567px" y="35.000ex" width="300.00001pt" height="5E+01%" fill="blue" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 295 B |
Loading…
Add table
Add a link
Reference in a new issue