Created
September 27, 2013 11:24
-
-
Save napotopia/6727184 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.2.10) | |
// Compass (v0.13.alpha.4) | |
// ---- | |
@mixin insertSVGWithFallback($image, $fallBackClass:'no-svg') { | |
background: url($image + ".svg") 0 0 no-repeat; | |
.#{$fallBackClass} & { | |
background: url($image + ".png") 0 0 no-repeat; | |
} | |
} | |
.foo { | |
@include insertSVGWithFallback('../images/icon_vvt_beta'); | |
} |
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
.foo { | |
background: url("../images/icon_vvt_beta.svg") 0 0 no-repeat; | |
} | |
.no-svg .foo { | |
background: url("../images/icon_vvt_beta.png") 0 0 no-repeat; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment