Prefix icon variables with app name to avoid conflicts

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-11-12 17:32:15 +01:00
parent 159d75945a
commit 521b2dd615
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 5 additions and 1 deletions

View File

@ -66,7 +66,11 @@
*/
@mixin icon-color($icon, $dir, $color, $version: 1, $core: false) {
$color: remove-hash-from-color($color);
$varName: "--icon-#{$icon}-#{$color}";
/* $dir is the app name, so we add this to the icon var to avoid conflicts between apps */
$varName: "--icon-#{$dir}-#{$icon}-#{$color}";
@if $core {
$varName: "--icon-#{$icon}-#{$color}";
}
#{$varName}: url(icon-color-path($icon, $dir, $color, $version, $core));
background-image: var(#{$varName});
}