News for hackers. Stuff that matters.
Re:CSS Sprites Revisited by smickie on Friday April 27, 2012 @11:05AM (#3899369)
I love spritifying and existing site and watching the load times drop in usage reports.

Here's a great idea that I would like to see implemented concerning css sprites and the rails asset pipeline:

In your .erb.css file you could include each background image individually, when you reference it in the css you would flag it as "spritable". Then when assets:precompile is ran some magic piece of code would build a single sprite image from all your background images and fill in the background-position. Automating the whole process.

Like most things I don't have the time/skill to do with, but nice idea nonetheless.

There are no comments on this comment yet.