Fix SVG icons on old browsers

We were using an `@extend` selector inside a `@supports` condition,
which didn't generate the `@supports` clause as we intended to, so
browsers with no support for mask images were still applying properties
which were meant for browsers with support for mask images.
This commit is contained in:
Javi Martín
2021-06-19 15:17:04 +02:00
parent 017035c659
commit d0f8560c33

View File

@@ -6,12 +6,14 @@
}
%svg-icon {
background: currentcolor;
content: "";
height: 1em;
mask-repeat: no-repeat;
mask-size: 100% 100%;
width: 1em;
@supports (mask-image: url()) {
background: currentcolor;
content: "";
height: 1em;
mask-repeat: no-repeat;
mask-size: 100% 100%;
width: 1em;
}
}
%admin-menu-icon {
@@ -37,11 +39,8 @@
}
}
@supports (mask-image: url()) {
&::#{$position} {
@extend %svg-icon;
mask-image: image-url("fontawesome/#{$style}/#{$icon}.svg");
}
&::#{$position} {
@extend %svg-icon;
mask-image: image-url("fontawesome/#{$style}/#{$icon}.svg");
}
}