I want to use Sass's built-in @each method to shorten this code:
.svg-circle-full {
@include mixinSVG((
'svg': $svgvar-icn-circle-full,
'isWide': false
)...);
}
.svg-circle-empty {
@include mixinSVG((
'svg': $svgvar-icn-circle-empty,
'isWide': false
)...);
}
.svg-circle-half {
@include mixinSVG((
'svg': $svgvar-icn-circle-half,
'isWide': false
)...);
}
Basically I need to be able to use the variable name from my @each loop inside of the mixinSVG mixin. I am trying this but it is failing when it hits the @each variable inside the 'svg' property:
@each $state in full, empty, half {
.svg-circle-#{$state} {
@include mixinSVG((
'svg': $svgvar-icn-circle-#{$state},
'isWide': false
)...);
}
}