FontAwesome version 5 warning

The other day I was on a project and as usual started using FontAwesome. As always when it comes to choosing between using a self-hosted script and Content Delivery Network I tend to us CDN so I make sure that I am up to date and the visitors get a faster loading of the page. So I googled for FA CSS and enqueued it within my wordpress project and used it here and there.

If you have noticed Woocommerce is in favour of using :before and :after a lot and to follow their routine I do the same when possible. To imitate one of their designs I tried to change to content of :before to FA. It didn’t work. 

At first I thought this was one of those simple matters of mistyping the code somewhere  or not including the file or perhaps the url is wrong but none of the simple solutions worked.

So as my procedure I realized that the gear had to be changed and a much broader possibilities had to be considered. I tested everything and by everthing I mean it. I place FA everywhere on the page and it worked except inside :before and :after.

Crawling through stack-overflow and WordPress support sites and even multilingual help forums I didn’t find anything to help except mentions of new version of FA. It suddenly occurred to me that the problem might be because of the latest version and it was. As soon as I downgraded the script the problem was solved that FA showed up at :before and :after

It seems that we have to wait for updates of FA. I believe the developers of FA completely missed pseudo-elements.

Heading to the next inevitable problem. Happy racking your brains :).

FontAwesome version 5 warning

Leave a Reply

Your email address will not be published. Required fields are marked *