O'Reilly logo

Sams Teach Yourself SVG in 24 Hours by Micah Laaker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Layers

Likely the most common annoyance when exporting Illustrator artwork into SVG is the misshapen id values generated by the names in the Layers palette. As most designers think in plain English and not in possible XML-compatible id attribute values, the names used for each layer in the palette (which convert into an object or group's id value) often result in bizarre output.

When using Illustrator 9, any layer name with spaces will export with the text “_x_200_” replacing the space. As such, “Bldg 1 Window” will export as “Bldg_x_200_1_x_200_Window.” Such an oddity results in not only an addition of 7 bytes for each space in all of your layer names, but also nearly illegible id values. Figure 21.1 shows the bizarre results of leaving spaces ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required