Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adamcoulombe/4321926 to your computer and use it in GitHub Desktop.
Save adamcoulombe/4321926 to your computer and use it in GitHub Desktop.
@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