3 ms·
Command-line CSS spriting
- deleted 16y ago[deleted]
- alanh 16y agoI’d been passively hoping for a command-line image spriting tool for a while, so this is great. But I don’t need it anymore. I’ve discovered @chriseppstein’s fabulous Compass. Now you don’t even need a command line — you can sprite directly in your (s)css! http://beta.compass-style.org/reference/compass/helpers/sprites/ http://beta.compass-style.org/reference/compass/helpers/spri... (This version isn’t stable yet, so install with `gem install compass --pre`. Actually, not sure if this feature is stable yet or not, but the beta version of Compass rocks.)
- morganpyne 16y agoI keep beating the Compass drum too. This approach seems like so much work and rather primitive in comparison. Compass will manage all this automatically, on the fly.
- trampsymphony 16y agoAlso worth checking out: - for flexibility, the CSS Sprite gem (https://github.com/flyerhzm/css_sprite https://github.com/flyerhzm/css_sprite) - for ease of use, the Lemonade gem (https://github.com/hagenburger/lemonade https://github.com/hagenburger/lemonade)
- moeffju 16y agoLemonade has actually been rolled into compass in the beta. It is highly recommended to use the compass beta over the lemonade gem now.
- hdragomir 16y agoYou may not have too much control over the positioning of the sprite parts, but that's minor. Can't wait to use this!
- troels 16y agoSure you do. Imagemagick can do almost anything.
- grayrest 16y agoIf you're going to use a tool to do your spriting, you might as well go all the way and data-uri inline your images. Spriting is a leaky abstraction that only exists today because the recipe for getting them working in old IE is complex enough that it needs to be automated.
- JoachimSchipper 16y agoThe basic idea works, but note that cmd `ls` cmd `ls *png` should be written as cmd * cmd *.png
- deleted 16y ago[deleted]
- jmcnevin 16y agoNo love for ImageMagick "montage"? http://www.imagemagick.org/script/montage.php http://www.imagemagick.org/script/montage.php http://www.imagemagick.org/Usage/montage http://www.imagemagick.org/Usage/montage
- pluc 16y agohttp://spriteme.org/ http://spriteme.org/
- Jasber 16y agoI just made one of these in Python: https://github.com/bradjasper/sprite/blob/master/sprite https://github.com/bradjasper/sprite/blob/master/sprite Currently it only does fixed-width sprites, but handles the generation of CSS for you.
- tropin 16y agoWhat browsers do support this? Do it break when the user changes font size, as I've read somewhere?