Skip to content

Instantly share code, notes, and snippets.

@ffdead
Created December 5, 2012 13:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ffdead/4215342 to your computer and use it in GitHub Desktop.
Save ffdead/4215342 to your computer and use it in GitHub Desktop.
How to use if-resolution SASS mixin
footer {
// only include 1x size image for 'non-retina' screens
@include if-max-resolution(1.49) {
background-image: url('img/footer-anchor@1x.png');
}
// only include 2x size image for 'retina' screens
@include if-min-resolution(1.5) {
background-image: url('img/footer-anchor@2x.png');
background-size: 10.5625rem 1.5625rem;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment