Open jaapvandervelde opened 4 years ago
Note that, as a workaround, I can insert the contents of the external stylesheet at the end of the internal <style>
element, but of course this requires some munging of the .svg and the use of an external stylesheet seems valid and preferable.
Thanks for this bug report.
It's actually a missing feature in CairoSVG, let's move this issue over there!
I'm including an svg element like this:
When loading the .svg in a browser, the styling linked to the .svg is applied:
However, when loading the .html linking the .svg in weasyprint, the svg is rendered correctly, but the linked styling is not applied.
The styling itself is correct, I've verified by copying the content from the .css and moving it into the
<style>
element inside the .svg, as a child of the<svg>
element and it is applied correctly, so the issue appears to be that the svg rendering in weasyprint does not load the external stylesheet.Although not relevant to the issue, it seems, here's an example statement from that css: