mirror of
https://github.com/svg/svgo.git
synced 2026-01-27 07:02:06 +03:00
SVGs can have the same presentation attribute declared redundantly in both the node attributes and `<style>` tag. This wouldn't break anything, but we can shave off a few more bytes by dropping the attribute in this case.
22 lines
727 B
XML
22 lines
727 B
XML
If we're going to inline styles for property that is also a presentation
|
|
attribute, and that presentation attribute was already defined in the node, we
|
|
can just drop the presentation attribute as it would be overridden by the style
|
|
anyway.
|
|
|
|
===
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 269 349">
|
|
<style type="text/css">
|
|
.a {
|
|
fill: #059669;
|
|
}
|
|
</style>
|
|
<path class="a" d="M191.5,324.1V355l9.6-31.6A77.49,77.49,0,0,1,191.5,324.1Z" fill="#059669" transform="translate(-57.17 -13.4)"/>
|
|
</svg>
|
|
|
|
@@@
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 269 349">
|
|
<path d="M191.5,324.1V355l9.6-31.6A77.49,77.49,0,0,1,191.5,324.1Z" transform="translate(-57.17 -13.4)" style="fill:#059669"/>
|
|
</svg>
|