6

I am trying to embed fontawesome 5 icons in my project. I need to add icons in pseudo elements (:before, :after). I could add regular icons but not solid icons. Both have same unicode value. This is my css so far,

label.star:before {
  content: '\f005';
  font-family: 'Font Awesome 5 Free';
}

Now it displays regular star icon. How can I make it solid icon?

Thanks in advance.

hakkim
  • 666
  • 15
  • 36

2 Answers2

15

To make it solid icon, add font-weight: 900;

label.star:before {
    content: '\f005';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}
Luvias
  • 563
  • 1
  • 7
  • 19
0

I know I'm late to the party, but...

If you need to change the icon style from Solid to Regular, just update the font-family:

font-family: 'Font Awesome 5 Free Regular';
Ricky
  • 2,912
  • 8
  • 47
  • 74