Creating your own custom icons inside of Adobe Illustrator allows for greater flexibility in design. You may also want to adjust something inside of an icon you downloaded from a third party. Whatever the case, you’ll want to export your SVG icons in an appropriate manner. This will help limit the number of conflicts you encounter and prevent icons from conflicting with one another.

This tutorial is also helpful if you’ve downloaded a set of icons from a third party and they cause styling issues with each other. Open up your third-party icons in Adobe Illustrator, or the program of your choice, and re-export the SVG icons using the settings listed below.

Export Settings

Exporting your icons out of Adobe Illustrator as an SVG file is easy. When your icon is ready, from within Adobe Illustrator, select File ⇨ Save As

From within Adobe Illustrator select File ⇨ Save As.

When the ‘Save As’ window appears, give your icon a name and change the ‘Format’ option at the bottom to SVG (svg).

Give your icon a descriptive name and set the format as SVG.

SVG Options

When the next window pops up you want to make sure the following settings are used:

  • SVG Profiles: SVG 1.1
  • Font Type: SVG
  • Font Subsettings: None (Use System Fonts)
  • Image Locations: Link

Next click on the More Options button in the bottom left hand corner.

Click on the ‘More Options’ button in the lower right hand corner of the SVG options window.

When the Advanced Options display you’ll want to change the CSS Properties option to Style Attributes. This is a very important.

Change the ‘CSS Properties’ option to ‘Style Attributes’ to ensure inline styles are used when generating the SVG icon.

Setting the ‘CSS Properties’ option to be ‘Style Attributes’ will export the SVG icon with inline styles applied to your SVG icon. Otherwise the icons will export with CDATA strings inside of style tags, possibly causing a number of issues on your site. Icons with inline styles will prevent conflicts with class names or mistakenly inheriting styles from other icons you have installed on your site.

Important Considerations

If your icon contains any text you’re going to want to set the Type option at the top of the SVG Options window to ‘Convert to outline’. Converting your fonts to outlines allows browsers to properly render fonts. Browsers such as Firefox and Internet Explorer have trouble rendering SVG fonts without having the Font Family installed on the site. To ensure the icon with text works cross-browser you must make sure the fonts are converted to outlines.

Icons containing text should convert type to outlines before exporting the icon.

Was this article helpful? ·