Last active
May 19, 2017 01:30
-
-
Save benschwarz/5028819 to your computer and use it in GitHub Desktop.
SVG background image with PNG fallback (Sass mixin)
This file contains hidden or 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
$public_path: "./"; | |
@mixin vector-bg-with-fallback($name) { | |
background-image: url('#{$public_path}images/#{$name}.png'); | |
background-image: none, url('#{$public_path}images/#{$name}.svg'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi @benschwarz the public path "./" redirects to "../css/" root