Forked from anonymous/compass-image-set-mixins.scss
Created
December 17, 2012 20:33
-
-
Save adamcoulombe/4321926 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
@mixin png-image-set($image){ | |
@include image-set($image, "png"); | |
} | |
@mixin jpg-image-set($image){ | |
@include image-set($image, "jpg"); | |
} | |
@mixin gif-image-set($image){ | |
@include image-set($image, "gif"); | |
} | |
@mixin image-set($name,$extension){ | |
background-image: image_url("#{$name}.#{$extension}"); | |
background-image: -webkit-image-set(image_url("#{$name}.#{$extension}") 1x, image_url("#{$name}@2x.#{$extension}") 2x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment