Skip to content

Commit 1c8186d

Browse files
authored
refactor: enabled overwriting icons set via icon SCSS mixin (#510)
refactor: enabled overwriting programmatically set icons via icon SCSS mixin #509
1 parent 1bc1b21 commit 1c8186d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/_patterns/00-base/icons/_icons.helpers.scss

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
$position: "before",
77
$partial: false
88
) {
9+
// We're setting this on the parent tag, so that it could get overwritten via data-icon=*
10+
@if $glyph != "" {
11+
--icon-glyph: "#{$glyph}";
12+
}
13+
914
&::#{$position} {
1015
--icon-font-family: "#{"icons-" + $size + "-" + $style}",
1116
"missing-icons" !important;
@@ -25,9 +30,6 @@
2530
);
2631
}
2732

28-
@if $glyph != "" {
29-
--icon-glyph: "#{$glyph}";
30-
}
3133
@if $partial {
3234
content: var(--icon-glyph);
3335
display: inline-block;

0 commit comments

Comments
 (0)