refactor(icons): upgrade font-awesome syntax to version 6

This commit is contained in:
Cotes Chung 2022-12-08 06:08:26 +08:00
parent 7fb0ee0bed
commit 5561cd86b5
No known key found for this signature in database
GPG key ID: 0D9E54843167A808
3 changed files with 9 additions and 12 deletions

View file

@ -11,12 +11,6 @@
"alpha-value-notation": "number",
"selector-not-notation": "simple",
"color-hex-length": "long",
"declaration-block-single-line-max-declarations": 3,
"font-family-no-missing-generic-family-keyword": [
true,
{
"ignoreFontFamilies": ["Font Awesome 5 Free"]
}
]
"declaration-block-single-line-max-declarations": 3
}
}

View file

@ -98,10 +98,13 @@ blockquote {
color: var(--prompt-text-color);
&::before {
font-family: "Font Awesome 5 Free";
text-align: center;
width: 1.25rem;
margin-right: 0.75rem;
position: relative;
top: 0.4rem;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
}
> div {
@ -113,7 +116,7 @@ blockquote {
}
}
@include prompt("tip", "\f0eb", 400);
@include prompt("tip", "\f0eb", "regular");
@include prompt("info", "\f06a");
@include prompt("warning", "\f06a");
@include prompt("danger", "\f071");

View file

@ -141,14 +141,14 @@
transform: translateX(-50%);
}
@mixin prompt($type, $fw-icon, $icon-weight: 900) {
@mixin prompt($type, $fa-content, $fa-style: "solid") {
&.prompt-#{$type} {
background-color: var(--prompt-#{$type}-bg);
&::before {
content: $fw-icon;
content: $fa-content;
color: var(--prompt-#{$type}-icon-color);
font-weight: $icon-weight;
font: var(--fa-font-#{$fa-style});
}
}
}