SVG style attributes

Asked by Paul Hopgood

On editing a SVG document in InkScape, I find all the style attributes transformed into style attributes. Is there a way to preserve style attributes?

i.e. stroke-width="2" not style="stroke-width:2"

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
mahfiaz
Solved:
Last query:
Last reply:
Revision history for this message
Best mahfiaz (mahfiaz) said :
#1

No, such a thing is not implemented. And probably never will, as this would be a lot of hassle for almost nothing, no improved usability, only some extra slowdown of code. Simply get used to CSS style of defining things.

Revision history for this message
Paul Hopgood (phopgood) said :
#2

True you can use CSS style properties in the same way but the reason for having the simpler to manipulate presentation attributes is : If you are manipulating from javascript it is more efficient to use the presentation attributes and as javascript is only an interrpreted language it is more efficient for the offline tool to do the work of sorting out CSS style or presentation attributes.
When you implement animation you may have to reconsider this as only supporting one style would be rather a limitation!?