Created
September 13, 2012 13:54
-
-
Save kaelig/3714468 to your computer and use it in GitHub Desktop.
Hidpi / Retina CSS media query
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 (-webkit-min-device-pixel-ratio: 1.3), | |
| (-o-min-device-pixel-ratio: 2.6/2), | |
| (min--moz-device-pixel-ratio: 1.3), | |
| (min-device-pixel-ratio: 1.3), | |
| (min-resolution: 1.3dppx) { | |
| // Hi-dpi visuals | |
| } |
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
| @mixin hidpi { | |
| $hidpi-debug: false !default; | |
| @if $hidpi-debug { | |
| @content; | |
| } @else { | |
| @media (-webkit-min-device-pixel-ratio: 1.3), | |
| (-o-min-device-pixel-ratio: 2.6/2), | |
| (min--moz-device-pixel-ratio: 1.3), | |
| (min-device-pixel-ratio: 1.3), | |
| (min-resolution: 1.3dppx) { | |
| @content; | |
| } | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now a real project, see https://github.com/kaelig/hidpi