14 ms·
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
by smickie 14y ago
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.