Hi devs,
I've committed in r13161 an extension which will take the inline styles from the selected elements, find the common values and create a new css style in the existing or new style element at the top of the document. This replaces the inline styles with a class reference.
<rect style="fill:red;"/> <rect style="fill:red;"/> <rect style="fill:yellow;"/> <rect style="fill:red;stroke:green;"/>
Becomes:
<style> .name_of_choice { fill:red; } </style> <rect class="foo"/> <rect class="foo"/> <rect style="fill:yellow;"/> <rect class="foo" style="stroke:green;"/>
I've added this into the extensions menu under Stylesheets > Merge Styles into CSS. And I decided to push it into trunk instead of just keeping it on my hard drive because it might be useful to other users.
But I'd also like to sound it out too. So any issues you think, I'd love to hear. This should make it easier to make web svg I think.
Best Regards, Martin Owens