Created
December 11, 2012 00:51
-
-
Save jxson/4254764 to your computer and use it in GitHub Desktop.
using the image shortcut inside a media query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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