• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Style

Illustrator has a unique method of applying style to objects. When exporting SVG, Illustrator creates a series of styles beginning with st and ending in a sequentially building number. Though creating small style names shaves a number of bits off the file size, it also creates a problem for developers who are trying to understand what style names reference what style properties. Consider performing a global find & replace on your SVG document. Replace each st# instance with a more illustrative name.

For instance, if st7 fills an object with #336699, replace all instances of st7 with “Fill336699.” Be certain to start the find-and-replace task with the last style, as replacing st1 will catch both st1 and the first three characters of st10. Also, be sure not to use underscores in your style names, as CSS has strict rules for class names. Your viewer will display a “Bad CSS descriptor” error if you create a class name that isn't compatible.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint