Created
October 22, 2013 05:33
-
-
Save austinpray/7095668 to your computer and use it in GitHub Desktop.
Cannibalized bourbon.io hiDPI 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
// HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/) | |
@mixin hidpi($ratio: 1.3) { | |
@media only screen and (-webkit-min-device-pixel-ratio: $ratio), | |
only screen and (min--moz-device-pixel-ratio: $ratio), | |
only screen and (-o-min-device-pixel-ratio: #{$ratio}/1), | |
only screen and (min-resolution: #{round($ratio*96)}dpi), | |
only screen and (min-resolution: #{$ratio}dppx) { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment