Skip to content

Instantly share code, notes, and snippets.

@Munter
Created March 4, 2015 22:03
Show Gist options
  • Save Munter/2a133195d001538bc949 to your computer and use it in GitHub Desktop.
Save Munter/2a133195d001538bc949 to your computer and use it in GitHub Desktop.
/* Different size images based on same source image */
.thing-4x { background-size: 100px; background-image: url(image.svg?inkscape&resize=400); }
.thing-2x { background-size: 100px; background-image: url(image.svg?inkscape&resize=200); }
.thing-1x { background-size: 100px; background-image: url(image.svg?inkscape&resize=100); }
/* Different size images based on same source image, in individual sprite sheets */
.thing-4x { background-size: 100px; background-image: url(image.svg?inkscape&resize=400&sprite=4x); }
.thing-2x { background-size: 100px; background-image: url(image.svg?inkscape&resize=200&sprite=2x); }
.thing-1x { background-size: 100px; background-image: url(image.svg?inkscape&resize=100&sprite=1x); }
/* Collecting repeated background-image props in a single selector */
.all-4x-sprites {
-sprite-selector-for-group: 4x;
-sprite-location: url(4x.png?pngcrush=-rem(alla)&optipng); /* post processing sprite sheet output */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment