XF 2.2 FontAwesome weight

Nicolas FR

Well-known member
Hello.
Is it correct to use this syntax in HTML files for FA icons ?
HTML:
<i class="fa fa-star"></i>

Because, if i use this syntax, without specifying the weight of the icon as far, fas, fal instead of fa, I guess this should show the icon with the base weight set in the style properties, Regular by default. But in fact, without specifying the weight in the syntax and with Regular defined by default, it is the Solid icons that are displayed.
 
Solution
Yeah use our template tag. This allows us to use the default weight as per the style property.

If you use just the HTML tag you’ll get the default weight from FA themselves which is solid. And the default is solid because before FA5, essentially all icons were solid.

If you need to specify a particular weight to override the style property (or brand, or duotone icon) then you just add that to the class of our template tag:

HTML:
<xf:fa icon="fal fa-star" />
Yeah use our template tag. This allows us to use the default weight as per the style property.

If you use just the HTML tag you’ll get the default weight from FA themselves which is solid. And the default is solid because before FA5, essentially all icons were solid.

If you need to specify a particular weight to override the style property (or brand, or duotone icon) then you just add that to the class of our template tag:

HTML:
<xf:fa icon="fal fa-star" />
 
Solution
Top Bottom