Created
May 1, 2013 18:44
-
-
Save mattvague/5497342 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 helper mixins for Compass | |
// http://www.joelambert.co.uk | |
// | |
// Copyright 2012, Joe Lambert. | |
// Free to use under the MIT license. | |
// http://joelambert.mit-license.org/ | |
// Inline for standard / URL for retina | |
=inline-background-image-retina($image) | |
background-image: asset-data-uri($image) | |
@if file_exists(retina_filename($image)) | |
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-webkit-min-device-pixel-ratio: 1.75) | |
@include background-size(image-width($image) auto) | |
background-image: image-url(retina_filename($image)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment