3 ms·
The ideal sprite system is one that is automated. A script that grabs all the images in a folder and makes a sprite, recording their position and name and then
by btipling 14y ago
The ideal sprite system is one that is automated. A script that grabs all the images in a folder and makes a sprite, recording their position and name and then replacing the Less (or Sass) variable definition for each image with the stored value.
Doing this manually is insane and probably not worth it unless you're fielding requests like Facebook, Google or Amazon and every split second spent loading is lost money.
- huggyface 14y agoThe ideal sprite system is one that is automated. I wonder if the growth of SPDY undermines the entire foundation of using CSS sprites?
- nekgrim 14y agoWhy edit the less file? Isn't this order 1. Compile LESS/SASS 2. Sprite Generation 3. Minification easier to do ?
- btipling 14y agoWhen would you replace the background image positions? Wouldn't it be easier to do that in one place than many? You don't have the sprite positions until you generated the sprite.
- envex 14y agoCompass will create your sprite sheet for you and give you all the classes you need to use them. http://compass-style.org/help/tutorials/spriting/ http://compass-style.org/help/tutorials/spriting/