inkscape does not remove stop-color attribute from lineargradient tag when modified

Bug #1075325 reported by dexter
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

If you initially open a file which has a <linearGradient>tag with a <stop> and a stop-color attribute, you can notice that it is correctly drawn in Inkscape.

When you edit that gradient, Inkscape adds a style attribute inside the <stop> tag that overrides the stop-color attribute and draws it correctly.

But some programs fail to draw the gradient correctly (e.g. QtSvg module) because stop-color attribute and style attribute are both present. I don't know whether this is a bug and what the SVG spec says about how to interpret such cases.

Maybe Inkscape should remove the stop-color attribute in favor of the style one ?

Tags: gradient svg
Revision history for this message
su_v (suv-lp) wrote :

> what the SVG spec says about how to interpret such cases.

«(…) In general, this means that the presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes.

User agents that do not support CSS must ignore any CSS style rules defined in CSS style sheets and ‘style’ attributes. In this case, the CSS cascade does not apply. (Inheritance of properties, however, does apply. See Property inheritance.)»
<http://www.w3.org/TR/SVG11/styling.html#UsingPresentationAttributes>

Did you also file a report for the 'QtSvg' module? (Note that librsvg seems to fail with such gradients too, whereas other SVG implementations like modern browsers, and Squiggle (Batik 1.7, 1.8pre) use the color from the CSS style attribute as expected, and ignore the presentation attribute if the 'style' attribute is present.

tags: added: gradient svg
Revision history for this message
Trent McPheron (tiz-ex1) wrote :

It seems like GTK-based applications just ignore the style attribute entirely. Is there a reason that inkscape adds the style attribute instead of modifying the stop-color and stop-opacity attributes?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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