Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fontawesome 5 solid and regular icons n pseudo elements

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.

like image 862
hakkim Avatar asked Apr 06 '18 05:04

hakkim


Video Answer


1 Answers

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

label.star:before {
    content: '\f005';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}
like image 180
Luvias Avatar answered Oct 22 '22 14:10

Luvias