News for hackers. Stuff that matters.
Re:CSS Sprites Revisited by btipling on Friday April 27, 2012 @11:01AM (#3899335)
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.

Re:CSS Sprites Revisited by envex on Friday April 27, 2012 @12:26PM (#3899806)
Compass 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/

Re:CSS Sprites Revisited by nekgrim on Friday April 27, 2012 @11:27AM (#3899469)
Why edit the less file? Isn't this order

1. Compile LESS/SASS

2. Sprite Generation

3. Minification

easier to do ?

Re:CSS Sprites Revisited by btipling on Friday April 27, 2012 @01:04PM (#3900006)
When 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.
Re:CSS Sprites Revisited by huggyface on Friday April 27, 2012 @11:22AM (#3899443)
The ideal sprite system is one that is automated.

I wonder if the growth of SPDY undermines the entire foundation of using CSS sprites?