It seems that the (PHP) Imagick does not accept styling with CSS even if the <style>
is inside the SVG's <def>
. Is that correct? I couldn't find a reference for this.
If so, what would be a way to still get the desired results? Maybe replace all the classes with their definitions? So, for example, if there is
.some-class {
stroke-dasharray: 5 5;
}
then replace class="some-class"
by stroke-dasharray="5 5"
, or, alternatively, by style="stroke-dasharray: 5 5;"
since Imagick seems to understand style attributes.