Reputation: 175
I have the following pseudo-css rendering the correct Font-Awesome icons, but just not as solid icons:
content: "\f0dc";
font-family: 'Font Awesome 6 Pro';
padding-left: 5px;
font-weight: 900;
This renders the icons as "regular" => not as solid icons.
What do I need to do to have these icons render as solid icons?
Upvotes: 1
Views: 2099
Reputation: 57
Looking at the documentation you do that by specifying a font with a variable which would be
font: var(--fa-font-solid);
https://docs.fontawesome.com/web/setup/upgrade/pseudo-elements
Upvotes: 0
Reputation: 9876
When using Font Awesome Pro in CSS in, say, a psuedo-class or whatever, the solid icon is achieved through font-weight: bold
specifically:
.something:after {
content: '\f04b';
font-family: "Font Awesome 6 Pro", sans-serif;
font-weight: bold; // <-- THIS
}
Upvotes: 1