Created
September 10, 2013 14:53
-
-
Save killercup/6510613 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
/* | |
* SVG Background with Fallback | |
* | |
* Usage: | |
.logo { | |
margin: 12px auto 0; | |
$w: 150px; | |
$h: 75px; | |
width: $w; | |
height: $h; | |
@include svg-bg-with-fallback("book-compact-logo", $w, $h); | |
} | |
*/ | |
@mixin svg-bg-with-fallback($src, $width, $height) { | |
background: image-url("#{$src}.png") no-repeat 0px 0px; | |
background: linear-gradient(transparent, transparent), | |
image-url("#{$src}.svg") no-repeat 0px 0px; | |
background-size: $width $height; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment