Skip to content

Instantly share code, notes, and snippets.

@DaveKin
Created November 10, 2015 15:49
Show Gist options
  • Save DaveKin/b7abddb92bd3323fc871 to your computer and use it in GitHub Desktop.
Save DaveKin/b7abddb92bd3323fc871 to your computer and use it in GitHub Desktop.
barebones media query for 1,2 and 3x resolution devices, autoprefixer will convert this for different targets
.icon {
background-image: url(1x.png);
}
@media only screen and (min-resolution: 1.3dppx){
.icon {
background-image: url(2x.png);
}
}
@media only screen and (min-resolution: 2.25dppx){
.icon {
background-image: url(3x.png);
}
}
@DaveKin
Copy link
Author

DaveKin commented Nov 10, 2015

Just until I convert everything to svg ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment