Setting CSS class attribute with Adobe Illustrator [closed]
Asked Answered
I

1

8

I am using Adobe Illustrator to create SVG images. I need to set some additional attributes to the elements in the SVG, for example the CSS class attribute. I would even like to add attribute from a custom namespace to it.

How is this possible? The attributes from a custom namespace are "nice to have", but the class attribute is a MUST.

Ingram answered 12/11, 2012 at 15:52 Comment(7)
Not sure why this is closed. It is common to do front-end development with custom SVG code, and it is also common to create/edit SVGs in Illustrator. Other than the fact that the question is 2 years old now, I think it should be reopenedFalsehood
Why off topic? I'm using Inkscape as SVG IDE to develop JavaScript applications that uses SVG. I have a lot of issues with Inkscape on Mac and I'm trying to know if Illustrator can help me... and this entry brings me hope :)Australasia
I have the same question, and I'm using AI created SVGs in my JS application too. What's the rationale behind closing it, other than that it has to do with a drawing tool?Victoriavictorian
The best way to add a class to your SVG in Illustrator is by using graphic styles. Hope that helps someone!Decay
Just another useful question that is closed.Quasi
This question appears high in many relevant search results. Closing it feels like designophobia, and is inexplicable while this question remains: #13236865Means
More constructively, the end of this article contains a possible answer that works (with caveats) as of CC 2015: creativedroplets.com/export-svg-for-the-web-with-illustrator-ccMeans
L
1

I have not found a method for doing this with Adobe Illustrator, but it is very easy with Inkscape. Use the XML Editor (Edit » XML Editor) hack your attribute with namespace then Ctrl+Enter and it will be in the XML.

Lysine answered 12/11, 2012 at 16:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.