1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-31 07:44:22 +03:00
Files
svgo/test/plugins/inlineStyles.20.svg
Bogdan Chadkin 318bd5b8fa Forbid invalid <style> type attribute (#1400)
This fixes one more case in regression tests.
Also I added support for description in test cases.
This will let make tests more atomic.
2021-03-03 13:20:55 +03:00

32 lines
783 B
XML

<style> may have type attribute. Values other than the empty string
or text/css are ignored.
===
<svg>
<style type="text/invalid">
.invalid { fill: red; }
</style>
<style type="text/css">
.css { fill: green; }
</style>
<style type="">
.empty { fill: blue; }
</style>
<rect x="0" y="0" width="100" height="100" class="invalid" />
<rect x="0" y="0" width="100" height="100" class="css" />
<rect x="0" y="0" width="100" height="100" class="empty" />
</svg>
@@@
<svg>
<style type="text/invalid">
.invalid { fill: red; }
</style>
<rect x="0" y="0" width="100" height="100" class="invalid"/>
<rect x="0" y="0" width="100" height="100" style="fill:green"/>
<rect x="0" y="0" width="100" height="100" style="fill:blue"/>
</svg>