I'm using Compass (a CSS Framework) to generate sprite images. It work, but compass generate only a background-position for each image.
Is it possible to get also the width and the height for each image in the sprite?
This is my code:
@import "ico/*.png";
@include all-ico-sprites;
The generated code:
.ico-sprite, .ico-bag-blue, .ico-bag-black {
background: url('../images/ico-s78b1a1919b.png') no-repeat;
}
.ico-bag-blue {
background-position: 0 0;
}
.ico-bag-black {
background-position: 0 -24px;
}
And the code i would like to have:
.ico-sprite, .ico-bag-blue, .ico-bag-black {
background: url('../images/ico-s78b1a1919b.png') no-repeat;
}
.ico-bag-blue {
background-position: 0 0;
width:40px;
height:24px;
}
.ico-bag-black {
background-position: 0 -24px;
width:44px;
height:30px;
}
Can anyone explain to me how I can do that? Thanks.