Position of style element matters (CSS)
Bug #1680778 reported by
kensanata
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Triaged
|
Medium
|
Unassigned |
Bug Description
Using Inkscape 0.91 on Mac OS 10.12.4.
I have attached a piece of SVG is a minimal working example of something an app I'm writing might produce. In the browser, you'll see a white square, and a red square. In Inkscape, you'll see two black squares (no fill means black). But if you mark all, delete, and undo, you'll see a white square and a red square! When I asked about this on G+ [1] Michal Čaplygin suggested that moving the style element before the use element solves the initial paint issue. And it does. So reordering the document is my workaround.
[1] https:/
Thanks for taking the time to file a report!
Confirmed on Windows XP, Inkscape 0.92.1. According to the SVG specifications (https:/ /www.w3. org/TR/ SVG/styling. html#Scope):
"Stand-alone SVG document
There is one parse tree. Style sheets defined anywhere within the SVG document (in style elements or style attributes, or in external style sheets linked with the style sheet processing instruction) apply across the entire SVG document."