Replace single style attribute with individual attributes?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
I'm using Inkscape to create interactive SVG drawings that allow the viewer
colour in the picture, painting by numbers style.
The script needs to access the fill colour of each element, but Inkscape
uses the style attribute on each element to set the fill colour. The style
attribute is seen as a single text string to the script and I have to
manually go through each element changing them for my script code to work.
Manipulating the style attribute in code would require parsing to
preservation all the other style definitions.
Inscape saves using style attribute:
<rect
style="
troke-linecap:
ray:none;
but I have to convert to the following to access the fill colour from
script:
<rect
style="
:round;
ke-dashoffset:
Can there be a way to force Inkscape to save style attributes of drawing
elements as separate attributes, either be an option during save, or as an
internally permanent solution (ie: drop use of single style attribute)?
summary: |
- Replace single style attribute with individual attrubutes? + Replace single style attribute with individual attributes? |
tags: | added: styles svg |
This is not something we can do easily at this time, due to the way our style code is implemented, however it's a good idea. Marking it as wishlist.