Avoid CSS style attributes?

Post questions on how to use or achieve an effect in Inkscape.
rulanad
Posts: 1
Joined: Fri Jul 06, 2012 7:54 pm

Avoid CSS style attributes?

Postby rulanad » Fri Jul 06, 2012 7:59 pm

Hi,

is there a way to force inkscape to use SVG attributes instead of CSS styles?

For example, I want

Code: Select all

<rect fill="red" stroke="blue" />


instead of

Code: Select all

<rect style="fille:red;stroke:blue" />


in my SVG file.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Avoid CSS style attributes?

Postby brynn » Sat Jul 07, 2012 12:07 pm

Image
Welcome to InkscapeForum!

I'm probably going to regret trying to answer this question. But the comments I make might lead you closer to what you need to know, while waiting for someone with more knowledge in this area, to reply.

Inkscape, to my knowledge, does not write CSS. As far as I know, it writes XML only, and it can be seen in the XML Editor (Edit menu) (or by opening an SVG file in a browser). It's my understanding that SVG code is written using XML language, not CSS.

Hopefully someone else can explain it better. And I certainly look forward to learning more about this myself :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Avoid CSS style attributes?

Postby ~suv » Sat Jul 07, 2012 1:23 pm

rulanad wrote:is there a way to force inkscape to use SVG attributes instead of CSS styles? (…)

No, Inkscape does not offer such an option internally (related feature requests #168406, #171503).

Converting CSS styles into presentation attributes is among the default options when saving as 'Optimized SVG' (based on scour).


Return to “Help with using Inkscape”