Assume I have the following style.css file:
h1 {
padding: 10px;
background: url('/img/header.png');
}
p {
background: url('/img/p.png');
}
I am in need of creating an image sprite for this CSS automatically. The desired outcome should be similar to this:
h1 {
padding: 10px;
background: url('/img/sprite.png') -47px 0;
}
p {
background: url('/img/sprite.png') -130px 0;
}
Is it feasible to achieve this automatically using a grunt task?