From 521b2dd61572202519c2a2ee8b1bac71c42e0c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 12 Nov 2018 17:32:15 +0100 Subject: [PATCH] Prefix icon variables with app name to avoid conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/css/functions.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/css/functions.scss b/core/css/functions.scss index 70c0b688fe..c34765154e 100644 --- a/core/css/functions.scss +++ b/core/css/functions.scss @@ -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}); }