A node script to aid SVG in CSS
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
demo
lib
.gitignore
README.md

README.md

nodecsssvg

A node script to aid SVGs in CSS.

Requires imagemagick-native https://github.com/mash/node-imagemagick-native


About

While wanting to adopt SVGs into the frontend development life cycle, it's currently too cumbersome to support backwards compatibility. This tool aims to automate the fallback process. By interpreting SVG files, converting them to inline data URIs, generating the PNGs and IE style sheet.

Why

Currently encoding SVG files into a CSS file is a fairly manual process. And once this is done visibility of the asset is obscured. To update the SVG you need to re-encode the changes, find the line of CSS containing the asset, paste in the new code, then save out a PNG for fallback.

  1. Keep visibility of the assets
  2. Auto encode asset data for cleaner source files
  3. Auto generate PNG fallbacks

Usage

... to come