Last active
August 29, 2015 14:08
-
-
Save roblevintennis/7347791c906a72c2e166 to your computer and use it in GitHub Desktop.
Inline SVG with Cacheable External File Mixin
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
// Example using multiple colors with SVG Sprites .. see it in an example with: | |
// $ git clone -b svg-inline-experiments --single-branch https://github.com/unicorn-ui/Buttons.git Buttons && cd Buttons && npm install && pushd svg-builder && npm install && grunt && popd && grunt dev | |
@mixin svgColors($fillColor: false, $color: false, $patchCurrentColorForIE: false) { | |
@if $fillColor { | |
fill: $fillColor; | |
} | |
@if $color { | |
color: $color; | |
} | |
@if $patchCurrentColorForIE { | |
* [fill='currentColor'] { | |
fill: currentColor; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment