Position of style element matters (CSS)

Bug #1680778 reported by kensanata
6
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://plus.google.com/+AlexSchroeder/posts/Wq8P2TC9aRa

Tags: css svg
Revision history for this message
kensanata (kensanata-gmail) wrote :
jazzynico (jazzynico)
tags: added: css svg
Revision history for this message
jazzynico (jazzynico) wrote :

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."

Changed in inkscape:
importance: Undecided → High
status: New → Triaged
importance: High → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.