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

Project Samples

Project Activity

See All Activity >

Categories

HTML/XHTML

License

MIT License

Follow svg-sprite

svg-sprite Web Site

You Might Also Like
1Password makes it easy to store and share passwords anywhere, anytime Icon
1Password makes it easy to store and share passwords anywhere, anytime

More than a password manager.

Protect yourself, your family, or your global workforce with simple security, easy secret sharing, and actionable insight reports.
Start Today
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of svg-sprite!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript HTML XHTML

Registered

2023-04-21