Editing a gradient with seperate attributes creates an extra style attribute

Bug #1637767 reported by WilloVincent
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

When editing a gradient's stop colours whose values for stop colour and stop opacity are defined seperately as "stop-color" and "stop-opacity" attributes as supposed to be defined as one "style" attribute (the way Inkscape saves it) will create an extra "style" attribute.

So the existing "stop-color" and "stop-opacity" won't be touched nor removed but an extra "style" attribute containing the changed colour will be written afterwards.

Example:

Editing the following gradient stop colours (valid SVG)

      <stop
         offset="0"
         stop-color="#f4b36f"
         stop-opacity="1"/>
      <stop
         offset="1"
         stop-color="#f5bd83"
         stop-opacity="1"/>

results in:

      <stop
         offset="0"
         stop-color="#f4b36f"
         stop-opacity="1"
         id="stop7"
         style="stop-color:#ffff00;stop-opacity:1" />
      <stop
         offset="1"
         stop-color="#f5bd83"
         stop-opacity="1"
         id="stop9"
         style="stop-color:#0000ff;stop-opacity:1" />

This causes that when rendered with QtSVG or librsvg (which don't support correct style processing order) the gradient is still shown with the original colours.

Gecko, Chromium and WebKit show the gradient colours correctly anyway.

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

Reported earlier as:
* Bug #1075325 “inkscape does not remove stop-color attribute from lineargradient tag when modified”
  https://bugs.launchpad.net/inkscape/+bug/1075325

Related earlier report (old color of 'fill' presentation attribute is retained (unchanged), new modified color is updated and stored as style property only):
* Bug #1265637 “Inkscape not saving editing svg properly”
  https://bugs.launchpad.net/inkscape/+bug/1265637

Proposing to link as duplicate to bug #1075325.

jazzynico (jazzynico)
tags: added: gradient svg
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.