@mixin icon { display: inline-flex; > svg { width: 100%; height: 100%; * { transition: fill $hover-transition-time; } } } @mixin icon-size($size) { $icon-size: $size * .1rem; width: $icon-size; height: auto; margin: $icon-size / 4; } @mixin icon-style-default { > svg * { fill: $color-black; } } @mixin icon-style-active { > svg * { fill: $color-primary; } } @mixin icon-style-inverted { > svg * { fill: $color-white; } } .icon { @include icon; @include icon-size(16); @include icon-style-default; &.icon--tiny { @include icon-size(10); } }