Skip to content

Instantly share code, notes, and snippets.

@juandazapata
Last active December 11, 2015 21:48
Show Gist options
  • Save juandazapata/4664930 to your computer and use it in GitHub Desktop.
Save juandazapata/4664930 to your computer and use it in GitHub Desktop.
.logo
+at2x(logo-mams, 74px, 84px)
=at2x($image_name, $w: auto, $h: auto, $extention: '.png')
background-image: image-url($image_name + $extention)
$x2img : $image_name + '@2x' + $extention
@media all and (-webkit-min-device-pixel-ratio : 1.5)
background-image: image-url($x2img)
background-size: $w $h
.logo {
background-image: url('/images/logo-mams.png');
}
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
.logo {
background-image: url('/images/logo-mams@2x.png');
background-size: 74px 84px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment