Last active
December 16, 2015 07:18
-
-
Save 2ndkauboy/5397402 to your computer and use it in GitHub Desktop.
A simple mixin to wrap some CSS into a pixel-ration media query
This file contains 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 pixel-ratio($ratio){ | |
@media (-webkit-min-device-pixel-ratio: $ratio), /* Webkit browsers */ | |
(min--moz-device-pixel-ratio: $ratio), /* old Firefox (prior to FF 16) */ | |
(min-resolution: #{$ratio}dppx), /* the standard using dppx */ | |
(min-resolution: #{$ratio * 96}dpi){ /* fallback using dpi */ | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment