Created
October 18, 2012 14:12
-
-
Save Integralist/3912086 to your computer and use it in GitHub Desktop.
Example of passing a code block to a Mixin to make it more flexible (especially for displaying retina content)
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 { | |
/* Target any and all high-density screens on any browser currently known (October 2012) */ | |
@media (min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(-webkit-min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx) { | |
@content; | |
} | |
} | |
@include retina { | |
background: url(../Images/Retina/logo_2x.png) 0 0 no-repeat; | |
background-size: 286px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment