Skip to content

Commit 521b2dd

Browse files
committed
Prefix icon variables with app name to avoid conflicts
Signed-off-by: Julius Härtl <[email protected]>
1 parent 159d759 commit 521b2dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/css/functions.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@
6666
*/
6767
@mixin icon-color($icon, $dir, $color, $version: 1, $core: false) {
6868
$color: remove-hash-from-color($color);
69-
$varName: "--icon-#{$icon}-#{$color}";
69+
/* $dir is the app name, so we add this to the icon var to avoid conflicts between apps */
70+
$varName: "--icon-#{$dir}-#{$icon}-#{$color}";
71+
@if $core {
72+
$varName: "--icon-#{$icon}-#{$color}";
73+
}
7074
#{$varName}: url(icon-color-path($icon, $dir, $color, $version, $core));
7175
background-image: var(#{$varName});
7276
}

0 commit comments

Comments
 (0)