From 1c8186dfb8c62ef7452e1d2e69eac9471c3ff4a3 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 13 Jul 2023 12:30:52 +0200 Subject: [PATCH] refactor: enabled overwriting icons set via icon SCSS mixin (#510) refactor: enabled overwriting programmatically set icons via icon SCSS mixin #509 --- source/_patterns/00-base/icons/_icons.helpers.scss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/_patterns/00-base/icons/_icons.helpers.scss b/source/_patterns/00-base/icons/_icons.helpers.scss index dfb8da8add..4ec8de0afd 100644 --- a/source/_patterns/00-base/icons/_icons.helpers.scss +++ b/source/_patterns/00-base/icons/_icons.helpers.scss @@ -6,6 +6,11 @@ $position: "before", $partial: false ) { + // We're setting this on the parent tag, so that it could get overwritten via data-icon=* + @if $glyph != "" { + --icon-glyph: "#{$glyph}"; + } + &::#{$position} { --icon-font-family: "#{"icons-" + $size + "-" + $style}", "missing-icons" !important; @@ -25,9 +30,6 @@ ); } - @if $glyph != "" { - --icon-glyph: "#{$glyph}"; - } @if $partial { content: var(--icon-glyph); display: inline-block;