A Plugin for SVG export to convert IDs to Classes, create BEM Naming based on the layes of the artboard. Furthermore it uses SVGO to compress and Clean up SVGs, right when you export them. This Plugin requires Sketch 52. The Plugin bases on the original Svgo Compressor from Bohemian Coding.
Usage
The SVG BEM extends the standard Sketch SVG Export and compress your SVG assets whenever you export them. You have to do anything.
Specific IDs or Classes Names
If you need a specific ID or Class yust use the # or . as prefix in ur Sketch layers.
Plugin Seetings
If you’re not happy with the default settings of SVG BEM, you can select Plugins › SVG BEM › Setting and change your defaults based on your needs.
- ID To Class Conversion: Turn On or OFF the SVG IDs to Classes conversion.
- #*?&@ Replacement: Specified separator to replace special character.
- Names to BEM Sty Conversion: Turn On or OFF the conversion to BEM style.
- BEM Seperator: Specified separator for the BEM style.
Install
- Download SVG BEM & unzip it.
- Double click SVG BEM.sketchplugin to install the Plugin.