Created
June 26, 2012 17:13
-
-
Save madrobby/2997187 to your computer and use it in GitHub Desktop.
The ultimate media query to rule them all ("all" being high DPI/"Retina" screens)
This file contains hidden or 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 (min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(-webkit-min-device-pixel-ratio: 1.5), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx) { | |
/* "retina" styles */ | |
} |
@mathiasbynens Fixed it to use the weird Mozilla variant. Looking good?
Looks good! You may (or may not) want to add -moz-min-device-pixel-ratio: 1.5
back in, in case Mozilla switch to that syntax before going unprefixed.
I recently came across some additional input on this topic by Brett Jankord http://www.brettjankord.com/2012/11/28/cross-browser-retinahigh-resolution-media-queries/ ...and wondered what your thoughts might be?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don’t forget about the awkwardly named
(min--moz-device-pixel-ratio: 1.5)
:)