drawsvg
drawsvg copied to clipboard
style tag
Hi! Building on #24 I added a way to add <STYLE> tags to the drawing. Would this be a good pull request, or is it sufficiently niche+straightforward that it doesn't belong in the core?
I'm OK with adding the style tag with the caveat (included in its doc string) that many SVG viewers (including Drawing.rasterize() which uses CairoSVG) do not support it and there will be variation between viewers.
See https://www.w3.org/TR/SVG11/styling.html,
"In SVG 1.1, support for inline style sheets using the ‘style’ element and ‘style’ was not required. In SVG 2, these are required."
https://svgwg.org/svg2-draft/styling.html
Keep in mind most viewers only support SVG 1.1 and modern browsers have begun supporting parts of SVG 2.