Skip to content

Instantly share code, notes, and snippets.

@roblevintennis
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roblevintennis/7347791c906a72c2e166 to your computer and use it in GitHub Desktop.
Save roblevintennis/7347791c906a72c2e166 to your computer and use it in GitHub Desktop.
Inline SVG with Cacheable External File Mixin
// 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