class attribute not saved in plain svg

Bug #419266 reported by Andre "Osku" Schmidt
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Martin Owens

Bug Description

if we add an attribute "class" to any svg element (with the inkscape xml editor), and when saved as inkscape svg, the "class" attributes are saved in the svg file. but if we save as plain svg, the class attributes are removed.

http://www.w3.org/TR/SVG11/styling.html#ClassAttribute

Tags: css saving styles
Revision history for this message
Thomas Holder (speleo3) wrote :

confirmed with r22159

Changed in inkscape:
status: New → Confirmed
jazzynico (jazzynico)
tags: added: svg
Changed in inkscape:
importance: Undecided → Medium
assignee: nobody → Jon A. Cruz (jon-joncruz)
tags: added: saving
tags: added: styles
Revision history for this message
jimmac (jimmac) wrote :

This issue is having effect on us with gnome-icon-theme-symbolic where we export a single sheet of icons into indivual plain svgs. We rely on classes to recolor parts of icons with an external stylesheet. Just trying to put some weight on importance :)

su_v (suv-lp)
tags: added: css
removed: svg
Revision history for this message
rabauke (sven-burmeister) wrote :

Setting a class element for a path is still not saved in plain svg with version 0.48. So basically this is a data loss bug.

http://www.w3.org/TR/SVG/paths.html#PathElement

Revision history for this message
jazzynico (jazzynico) wrote :

Related: Bug #1059244 "Reference to external css stylesheet removed when saving as plain svg".

Revision history for this message
Martin Owens (doctormo) wrote :

Fix in r13260. The plain svg export is now no longer dependant on updateRepr to both clone the xml tree AND remove sodipodi elements. Using it in this way was very broken.

The prune method was improved to include removing any inkscape/sodipodi elements and not just attributes.

The plain-svg output will still not include PI nodes or comments before the root element until the xml code has a duplicate method that can clone the entire document node.

Changed in inkscape:
assignee: Jon A. Cruz (jon-joncruz) → Martin Owens (doctormo)
status: Confirmed → Fix Committed
Revision history for this message
Granjow (simon-eu) wrote :

Thank you, Martin!

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.91
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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