@FWeinb This PR adds to currently existing behavior where currentColor is preserved for fills (I added this probably a year ago :yum: ), even if the clean array contains fill. Specifically, this PR also checks and preserves stroke.
Below you see I'm adding a stroke color from use element to achieve a second color.
I ran grunt and tests passed locally
The reason we're exploring strokes at all, is that we currently control our svg icon sizes via CSS class like icon-large, icon-small, etc. What happens, is that the stroke ends up scaling in an undesirable way where we'd prefer to have the option of having it not scale. Also, it'd be nice to actually be able to leave strokes as strokes on export from the vector program ex. AI (right now we compound path everything). To achieve the "no scale" we're going to utilize Chris's idea here: http://codepen.io/chriscoyier/pen/dIlep essentially:
@FWeinb This PR adds to currently existing behavior where
currentColor
is preserved for fills (I added this probably a year ago :yum: ), even if the clean array containsfill
. Specifically, this PR also checks and preservesstroke
.Below you see I'm adding a stroke color from
use
element to achieve a second color.I ran
grunt
and tests passed locallyThe reason we're exploring strokes at all, is that we currently control our svg icon sizes via CSS class like
icon-large
,icon-small
, etc. What happens, is that the stroke ends up scaling in an undesirable way where we'd prefer to have the option of having it not scale. Also, it'd be nice to actually be able to leave strokes as strokes on export from the vector program ex. AI (right now we compound path everything). To achieve the "no scale" we're going to utilize Chris's idea here: http://codepen.io/chriscoyier/pen/dIlep essentially: