Skip to content

Commit

Permalink
refactor: enabled overwriting icons set via icon SCSS mixin (#510)
Browse files Browse the repository at this point in the history
refactor: enabled overwriting programmatically set icons via icon SCSS mixin #509
  • Loading branch information
mfranzke authored Jul 13, 2023
1 parent 1bc1b21 commit 1c8186d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/_patterns/00-base/icons/_icons.helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,9 +30,6 @@
);
}

@if $glyph != "" {
--icon-glyph: "#{$glyph}";
}
@if $partial {
content: var(--icon-glyph);
display: inline-block;
Expand Down

0 comments on commit 1c8186d

Please sign in to comment.