Created
June 14, 2016 12:33
-
-
Save justb3a/8696a8a536523c8d42a79a4fcf0a2ecc to your computer and use it in GitHub Desktop.
frickelbase
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
| // a mixin for positioning svg icons | |
| // ====================================================================== | |
| // usage examples: | |
| // | |
| // @include sprite; ==> width: 1em; height: 1em; | |
| // @include sprite(18px, 50px, $color-second); => width: 18px; height: 50px; fill: $color-second; | |
| // @include sprite(1, 2, none, $color-second, 2px); width: $base-unit; height: $base-double; stroke: $color-second; stroke-width: 2px; | |
| @mixin sprite($width: 1em, $height: 1em, $fill: none, $stroke: none, $stroke-width: none) { | |
| width: parse-unit($width); | |
| height: parse-unit($height); | |
| @if $fill != none { | |
| fill: $fill; | |
| } | |
| @if $stroke != none { | |
| stroke: $stroke; | |
| stroke-width: parse-unit($stroke-width); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment