Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 851 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 851 Bytes

SVG namespacing

Default svg export of Sketch 3.8 has a problem when inlining many svgs in one html. There are many ids with very general name such as path-1, path-2, etc. If many inline svgs exported from Sketch 3.8 are in one HTML file, the first id would override following same ids.

This plugin do BEM-style namespacing. If you export a slice named Button, all ids in exported svg are converted like Button--path-1.

Currently it only namespaces slices, just because this way fits our requirement.

This plugin requires Sketch 3.8.

Install

  1. Go to releases page and download Source code (zip) file.
  2. Extract it in any folder.
  3. Double click SVG namespaceing.sketchplugin in finder.
  4. Done! From now on, all svg files exported from slices are namespaced.