SVG sprites & stacks galore. A low-level Node.js module that takes a bunch of SVG files, optimizes them, and bakes them into SVG sprites of several types along with suitable stylesheet resources (e.g. CSS, Sass, LESS, Stylus, etc.) It comes with a set of Mustache templates for creating stylesheets in good ol' CSS or one of the major pre-processor formats (Sass, Less and Stylus). Tweaking the templates or even adding your own custom output format is really easy, just as switching on the generation of an HTML example document along with your sprite. For an up-to-date list of browsers supporting SVG in general respectively SVG fragment identifiers in particular. Being a low-level library with support for Node.js streams, svg-sprite doesn't take on the part of accessing the file system (i.e. reading the source SVGs from and writing the sprites and CSS files to disk).
Features
- Traditional CSS sprites for use as background images
- CSS sprites with pre-defined view elements, useful for foreground images as well
- Inline sprites using the defs element
- Inline sprites using the symbol element
- SVG stacks
- General configuration options
- Output modes