$ npm install -g shalam
Shalam is a CSS processing tool that makes it incredibly easy to sprite the images in your web application. Unlike other CSS spriting tools, Shalam uses a special approach that is not only faster and simpler, but also supports high density displays and does a better-than-average job of minimizing wasted space inside the sprite.
.my-great-class {
font-size: 1.5em;
font-weight: bold;
-shalam-sprite: "files-page/chevron.png" dest-size(32px 32px);
}
…becomes…
.my-great-class {
font-size: 1.5em;
font-weight: bold;
-shalam-sprite: "files-page/chevron.png" dest-size(32px 32px);
/* shalam! */;
background: url(../img/sprites/main-sprite.compat.png) -20px -74px;
background: url(../img/sprites/main-sprite.png) -50px -24px/125px 32px;
/* end shalam */
}
…with only a single command:
shalam static/css/ static/images/ static/images/sprite