Skip to content

Instantly share code, notes, and snippets.

@thomasjbradley
Last active June 29, 2018 06:48
Show Gist options
  • Save thomasjbradley/3855791 to your computer and use it in GitHub Desktop.
Save thomasjbradley/3855791 to your computer and use it in GitHub Desktop.
css: retina media query
/* http://www.brettjankord.com/2012/11/28/cross-browser-retinahigh-resolution-media-queries/ */
/* 1.25 dpr */
@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
}
/* 1.3 dpr */
@media (-webkit-min-device-pixel-ratio: 1.3), (min-resolution: 124.8dpi) {
}
/* 1.5 dpr */
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
}
/*2.0 dpr */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment