Forum How do I...?

Styling SVG elements with external CSS stylesheet

jsweetman
Hi

I'm very impressed with the way Prince handles SVG. I'm wondering if it's possible to style the svg elements from an external style sheet?
e.g. if I have this in my SVG xml:
<rect class="myrectangle" x="94" y="0" width="33" height="29" rx="0" ry="0" />

And this in an external style sheet
.myrectangle {
stroke: cmyk(0,0,0,0);
}

How would I do something like that?

Many thanks and keep up the good work!

<><

mikeday
At the moment we don't support external style sheets for SVG, but we are planning to add this feature in a future release.
s5b
Have you made any further progress with adding external stylesheet processing for SVG images? This will be a great feature for providing consistent styling across all elements in a document.
mikeday
Yes, this will be available in the next release.
s5b
When will the next release be available? Are there any betas?
mikeday
We will release a beta version soon, before the end of the year.
mikeday
...or after the end of the year! :)

Prince 8.0 beta is out now, and includes support for the SVG <style> element.