Skip to content

Instantly share code, notes, and snippets.

@rvr
Created October 11, 2012 18:25
Show Gist options
  • Save rvr/3874491 to your computer and use it in GitHub Desktop.
Save rvr/3874491 to your computer and use it in GitHub Desktop.
Hi res image mixin
div {
@include image-2x("logo.png", "logo2x.png");
}
@mixin image-2x($image1, $image2) {
background-image: url($image);
@media (…) {
background-image: url($image2);
background-size: image-width($image1) image-height($image1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment