Let's say I have the following style.css file:
h1 { padding: 10px; background: url('/img/header.png'); } p { background: url('/img/p.png'); }
I need to sprite an image for this css automatically. I need to get something like this:
h1 { padding: 10px; background: url('/img/sprite.png') -47px 0; } p { background: url('/img/sprite.png') -130px 0; }
Is it possible to automate using the grunt task?
Erik
source share