Created
August 25, 2015 15:15
-
-
Save wvteijlingen/4b72d6d7e4f56d212c19 to your computer and use it in GitHub Desktop.
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
retina-background(url, width, height) | |
dir = dirname(url) | |
ext = extname(url) | |
base = basename(url, ext) | |
background-image: url(dir '/' base ext) | |
@media (-webkit-min-device-pixel-ratio: 2), | |
(min--moz-device-pixel-ratio: 2), | |
(-o-min-device-pixel-ratio: 2/1), | |
(min-device-pixel-ratio: 2), | |
(min-resolution: 192dpi), | |
(min-resolution: 2dppx) | |
background-image: url(dir '/' base '@2x' ext) | |
if width && height | |
background-size: width height |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment