Skip to content

Instantly share code, notes, and snippets.

@rbmntjs
Forked from judofyr/svg.css
Created November 2, 2012 14:23
Show Gist options
  • Save rbmntjs/4001662 to your computer and use it in GitHub Desktop.
Save rbmntjs/4001662 to your computer and use it in GitHub Desktop.
.lt-ie9 .error {
background-image: url("images/sprites/sprite.png"); }
.error {
background-image: url("images/sprites/sprite.svg"); }
@mixin img($name, $dir) {
.lt-ie9 %img_#{name} {
background-image: bust_url("images/#{$dir}/#{$name}.png");
}
%img_#{$name} {
background: transparent bust_url("images/#{$dir}/#{$name}.svg") no-repeat 0 0;
}
}
@include img("sprite", "sprites");
@include img("animation", "one-off");
.error {
@extend %img_sprite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment