richardbutler/node-spritesheet — pull request #18 by crh0872 (2013-03-08 15:00:44+00:00)
Title: Fix HiDPI CSS dimensions, make the selector option more powerful (fixes #17)

The 2 most recent commits simply fix HiDPI so that on retina devices, the images arent twice the size they're supposed to be.

The 3rd commit was discussed on #9 (you didn't seem convinced, but hear me out). I wish I'd developed them separate branches, because the retina patches are what really need to be upstream. But essentially, this makes the `selector` option more intelligent.

Example: `selector` option is set to `.spriticon` and spritesheet calls `resolveImageSelector` on a file which returns `.icon-outer .file`. It only makes sense to generate the selector `.icon-outer .spriticon.file`.

It essentially does the same thing it used to except that it knows to apply the rule to the last selector in a space-separated hierarchy. It also expects `resolveImageSelector` to return a real selector, rather than assuming it to just be a single class name.

Anyway, take it or leave it. I found it useful and sensible. Thanks!