Fix HiDPI CSS dimensions, make the selector option more powerful (fixes #17) #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 callsresolveImageSelector
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!