I'm using the following SCSS mixin
@mixin QuintIcon($path, $name, $color) {
ion-icon {
&[class*=#{quote($name)}] {
mask-image: url($path);
color: #{$color};
}
}
}
@include QuintIcon("../../assets/img/tabs/rings.svg", "quint-ring", "#FFF");
I expect the following result
ion-icon[class*="quint-ring"] {
mask-image: url("../../assets/img/tabs/rings.svg");
color: #FFF;
}
However i get this
ion-icon[class*=quint-ring] {
mask-image: url("../../assets/img/tabs/rings.svg");
color: #FFF;
}
Explanation
The difference between those two code blocks is on the first line right after the '=' symbol. I expect the value to evaluate into a quoted string, but it doesn't, even if I use the Quote SCSS Function. I'm plugging this into Ionic but this has nothing to do with styling, it works only with quotation marks.
Experimenting
You can test the following code at SassMeister