Last active
December 10, 2015 23:38
-
-
Save JoostKiens/4511035 to your computer and use it in GitHub Desktop.
Cross-browser, slimmed-down Sass media query mixin for high-density images.
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
/** | |
* Author: @joostkiens | |
* Licensed under the MIT license | |
*/ | |
@mixin hr-image($image, $width, $height) { | |
@media print, | |
(-webkit-min-device-pixel-ratio: 1.25), | |
(-o-min-device-pixel-ratio: 5/4), | |
(min-resolution: 120dpi) { | |
background-image: url($image); | |
background-size: $width $height; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment