simple data-uri stylesheet generator
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin bower > sus Oct 25, 2012
test Skip keyframes blocks. Mar 12, 2013
.gitignore first commit Oct 24, 2012
LICENSE update license Oct 29, 2012 style Oct 24, 2012
index.js :[ process.nextTick has a stack that can overflow. boo Apr 22, 2014
makefile first commit Oct 24, 2012


SUS parses your css source and generates two new CSS sources from it – a base source and a sprites source.

The base source has all your original styles minus all background image defintions.

The sprites source has all your background image defintions, but converted to data-uris


install sus with npm install sus -g

you can then run sus from your terminal

$ sus path/to/css/app.css

This will generate two files in place:

├── app-base.css
└── pay-sprites.css

Alternatively you can pass an option --out to specify which location the generated styles are placed:

$ sus path/to/css/app.css --out out/css/

Programatic API

Sus accepts a string of css source and an options object. Use the options object to specify the location that your css is referencing images from. Alternatively pass a tranformer method to the base object to return fully resolved image paths.

var sus = require('sus')

sus(data, {
  base: '/foo/bar'
}).parse(function (err, parsed) {
  parsed.base()    // base css styles
  parsed.sprites() // base css styles