Skip to content

Instantly share code, notes, and snippets.

@jxson
Created December 11, 2012 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jxson/4254764 to your computer and use it in GitHub Desktop.
Save jxson/4254764 to your computer and use it in GitHub Desktop.
using the image shortcut inside a media query
@media screen and (min-width: 768px) {
.foo {
background-image: url("thing-that-needs-retina.jpg");
}
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
{
background-image: url("thing-that-needs-retina@2x.jpg");
-webkit-background-size: 100px 100px;
-moz-background-size: 100px 100px;
background-size: 100px 100px;
}
}
}
@import 'nib'
@media screen and (min-width: 768px)
.foo
image 'thing-that-needs-retina.jpg' 100px 100px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment