Created
December 20, 2013 07:31
-
-
Save lunaroja/8051536 to your computer and use it in GitHub Desktop.
Retina Mixin
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
@mixin retina() { | |
@media only screen and (-webkit-min-device-pixel-ratio: 1.25), | |
only screen and (min-resolution: 120dpi) { | |
@content; | |
} | |
} | |
.icon { | |
background-size: 200px 40px; | |
background-image: url(img/icons.png); | |
@include retina() { | |
background-image: url(img/icons-2x.png); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment