Skip to content

Commit 5561cd8

Browse files
committed
refactor(icons): upgrade font-awesome syntax to version 6
1 parent 7fb0ee0 commit 5561cd8

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

.stylelintrc.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
"alpha-value-notation": "number",
1212
"selector-not-notation": "simple",
1313
"color-hex-length": "long",
14-
"declaration-block-single-line-max-declarations": 3,
15-
"font-family-no-missing-generic-family-keyword": [
16-
true,
17-
{
18-
"ignoreFontFamilies": ["Font Awesome 5 Free"]
19-
}
20-
]
14+
"declaration-block-single-line-max-declarations": 3
2115
}
2216
}

_sass/addon/commons.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,13 @@ blockquote {
9898
color: var(--prompt-text-color);
9999

100100
&::before {
101-
font-family: "Font Awesome 5 Free";
102101
text-align: center;
103102
width: 1.25rem;
104103
margin-right: 0.75rem;
104+
position: relative;
105+
top: 0.4rem;
106+
text-rendering: auto;
107+
-webkit-font-smoothing: antialiased;
105108
}
106109

107110
> div {
@@ -113,7 +116,7 @@ blockquote {
113116
}
114117
}
115118

116-
@include prompt("tip", "\f0eb", 400);
119+
@include prompt("tip", "\f0eb", "regular");
117120
@include prompt("info", "\f06a");
118121
@include prompt("warning", "\f06a");
119122
@include prompt("danger", "\f071");

_sass/addon/module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@
141141
transform: translateX(-50%);
142142
}
143143

144-
@mixin prompt($type, $fw-icon, $icon-weight: 900) {
144+
@mixin prompt($type, $fa-content, $fa-style: "solid") {
145145
&.prompt-#{$type} {
146146
background-color: var(--prompt-#{$type}-bg);
147147

148148
&::before {
149-
content: $fw-icon;
149+
content: $fa-content;
150150
color: var(--prompt-#{$type}-icon-color);
151-
font-weight: $icon-weight;
151+
font: var(--fa-font-#{$fa-style});
152152
}
153153
}
154154
}

0 commit comments

Comments
 (0)