Skip to content

Instantly share code, notes, and snippets.

@rvr
Created October 11, 2012 18:25
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
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