Skip to content

Commit 9f80653

Browse files
authored
refactor: moved the defaults / fallbacks (#170)
1 parent 7e0cd44 commit 9f80653

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

scss/icon/_icons.helpers.scss

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,9 @@
77
$size: $icon-size,
88
$style: $icon-style,
99
$position: "before",
10-
$partial: false,
11-
$defaultFontProperties: true
10+
$partial: false
1211
) {
1312
&::#{$position} {
14-
@if $defaultFontProperties {
15-
--icon-font-family: "#{"icons-" + $size + "-" + $style}",
16-
"missing-icons";
17-
--icon-font-size: #{to-rem($pxValue: $size)};
18-
}
19-
2013
@if $position == "before" {
2114
margin-inline-end: var(--icon-margin-after, #{$icon-content-space});
2215
}
@@ -35,9 +28,12 @@
3528
display: inline-block;
3629
/*** icon - partial ***/
3730
// * use !important to prevent issues with browser extensions that change fonts
38-
font-family: var(--icon-font-family) !important;
31+
font-family: var(
32+
--icon-font-family,
33+
"#{"icons-" + $size + "-" + $style}, missing-icons"
34+
) !important;
3935

40-
font-size: var(--icon-font-size);
36+
font-size: var(--icon-font-size, #{to-rem($pxValue: $size)});
4137
font-style: normal;
4238
font-variant: normal;
4339

0 commit comments

Comments
 (0)