Skip to content

Instantly share code, notes, and snippets.

@shrwnsan
Created November 30, 2012 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrwnsan/4175516 to your computer and use it in GitHub Desktop.
Save shrwnsan/4175516 to your computer and use it in GitHub Desktop.
Retina/high resolution media query
/* Clean version examples */
/* 1.25 dpr */
@media
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi){
/* Retina-specific stuff here */
}
/* 1.3 dpr */
@media
(-webkit-min-device-pixel-ratio: 1.3),
(min-resolution: 124.8dpi){
/* Retina-specific stuff here */
}
/* 1.5 dpr */
@media
(-webkit-min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi){
/* Retina-specific stuff here */
}
/*2.0 dpr */
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi){
/* Retina-specific stuff here */
}
@shrwnsan
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment