Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
swalkinshaw / _mixin_2ximages.scss
Created January 8, 2013 16:06 — forked from replete/_mixin_2ximages.scss
SASS mixin for retina background images. Requires Compass for the image-width and image-height functions.
@mixin image-2x($image1, $image2) {
background-image: url($image1);
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
background-image: url($image2);
background-size: image-width($image1) image-height($image1);
}
vars:
starfighters:
- username: patrick
github: patio11
name: "Patrick McKenzie"
- username: thomas
github: tqbf
name: "Thomas Ptacek"
- username: erin
github: boboTjones