News for hackers. Stuff that matters.
Re:Command-line CSS spriting by JoachimSchipper on Saturday February 19, 2011 @09:27AM (#2239054)
The basic idea works, but note that

    cmd `ls`
    cmd `ls *png`
should be written as

    cmd *
    cmd *.png
Re:Command-line CSS spriting by alanh on Saturday February 19, 2011 @03:07AM (#2238714)
I’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/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.)

Re:Command-line CSS spriting by trampsymphony on Saturday February 19, 2011 @04:22AM (#2238783)
Also worth checking out:

- for flexibility, the CSS Sprite gem (https://github.com/flyerhzm/css_sprite)

- for ease of use, the Lemonade gem (https://github.com/hagenburger/lemonade)

Re:Command-line CSS spriting by moeffju on Saturday February 19, 2011 @01:43PM (#2239573)
Lemonade has actually been rolled into compass in the beta. It is highly recommended to use the compass beta over the lemonade gem now.
Re:Command-line CSS spriting by morganpyne on Saturday February 19, 2011 @03:48AM (#2238755)
I 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.
Re:Command-line CSS spriting by grayrest on Saturday February 19, 2011 @09:18AM (#2239031)
If 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.
Re:Command-line CSS spriting by jmcnevin on Saturday February 19, 2011 @10:47AM (#2239199)
Re:Command-line CSS spriting by Jasber on Saturday February 19, 2011 @01:28PM (#2239534)
I just made one of these in Python: https://github.com/bradjasper/sprite/blob/master/sprite

Currently it only does fixed-width sprites, but handles the generation of CSS for you.

Re:Command-line CSS spriting by hdragomir on Saturday February 19, 2011 @03:23AM (#2238726)
You may not have too much control over the positioning of the sprite parts, but that's minor.

Can't wait to use this!

Re:Command-line CSS spriting by troels on Saturday February 19, 2011 @06:00AM (#2238859)
Sure you do. Imagemagick can do almost anything.
Re:Command-line CSS spriting by tropin on Saturday February 19, 2011 @03:02PM (#2239753)
What browsers do support this? Do it break when the user changes font size, as I've read somewhere?
Re:Command-line CSS spriting by pluc on Saturday February 19, 2011 @12:28PM (#2239393)