Answer the question
In order to leave comments, you need to log in
How to customize CSS output template in Grunt Spritesmith?
I'm implementing this thing into the project https://github.com/Ensighten/grunt-spritesmith
The generator itself is quite simple and already makes a sprite perfectly, but the output CSS can be optimized by reducing it by about a quarter.
This is what the output looks like by default:
.icon-audio-mid {
background-image: url(build/sprite.png);
background-position: -32px -128px;
width: 32px;
height: 32px;
}
.icon {
background-image: url(build/sprite.png);
}
.icon-audio-mid {
background-position: -32px -128px;
width: 32px;
height: 32px;
}
.icon-video-mid {
background-position: -32px -128px;
width: 32px;
height: 32px;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question