Merge pull request #12421 from nextcloud/bugfix/noid/icons-cacher-app-prefix

Prefix icon variables with app name to avoid conflicts
This commit is contained in:
Morris Jobke 2018-11-15 12:24:23 +01:00 committed by GitHub
commit 7baa67cafe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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});
}