Skip to content

Instantly share code, notes, and snippets.

@madrobby
Created June 26, 2012 17:13
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save madrobby/2997187 to your computer and use it in GitHub Desktop.
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)
@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 */
}
@iDGS
Copy link

iDGS commented Sep 14, 2013

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