I am using grunt-spritesmith
and it generates a css file such as this:
.icon-admin {
background-image: url(../sprites/spritesheet.png);
background-position: -288px -856px;
width: 37px;
height: 32px;
}
.icon-report {
background-image: url(../sprites/spritesheet.png);
background-position: -256px -888px;
width: 26px;
height: 28px;
}
This works fine. What I want to do is to use a base css class for icons for specifying the background-image
(like what Compass does), so the output is like this:
.icon {
background-image: url(../sprites/spritesheet.png);
}
.icon-admin {
background-position: -288px -856px;
width: 32px;
height: 32px;
}
.icon-report {
background-position: -256px -888px;
width: 24px;
height: 24px;
}
I wonder if this is possible?