XF 2.2 Using weight-independent font awesome icons in phrases


Well-known member
XenForo has a style property for Font Awesome Weight.

I might be missing smth, but it does not seem possible to use a FA icon in a phrase that does respect this property.

If I use <i class="fa fa-whatever"></i> in a phrase it will use this icon in solid weight.
I could also make it use light or regular, but I don't see a way to use the configured weight.

Any ideas?
Yeah, that would work ... if I have control over the incovcation.

If it is being called from PHP code I would have to modify the code or write a class extension to do so.
That seems like a lot of overhead for just using an icon :(
We don't tend to use icons inside phrases ourselves so it's never really come up.

You'd have to add a custom class to the HTML inside your phrase, e.g. faweight and define that in CSS somewhere to have the configured weight, e.g.

    font-weight: @xf-fontAwesomeWeight;
Thats's basically what I am doing right now, but I had some hope I was missing smth. and this could be avoided.

Would be nice if smth. like that would exist in master :)

We do use FA icons in phrases for help pages (to explain how certain tasks can be performed, etc.)
Top Bottom