According to the SVG specs at
https://www.w3.org/TR/SVG11/styling.html#StylingWithCSS,"it is highly recommended that internal style sheets be placed inside CDATA blocks.". But when I do this, the styles are then ignored by ImageMagick when converting to e.g. PNG. For example, here's a basic file:
Code: Select all
<svg baseProfile="full" height="200" version="1.1" width="200" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
<![CDATA[
.edge {fill: none}
]]>
</style>
</defs>
<path class="edge" d="M 20 20 V 100 H 100" />
</svg>
This display with no diagonal fill in most SVG renderers, but not when I do "convert tmp.svg tmp.png". If I remove the "<![CDATA[" string and its closing "]]>", then ImageMagick does the right thing.