FontAwesomePHP
FontAwesomePHP copied to clipboard
Class problem when same icon is used multiple times on the same page
Hi,
I think there is a problem when a same icon is used multiple times on the same page.
If I use this code :
{!! FA::icon('times') !!} {!! FA::icon('times') !!} {!! FA::icon('times') !!} {!! FA::icon('times') !!}
The first cross will be correctly displayed, but not the three others :

The bug is linked to a problem in the source code : the "fas" class is missing in the three last crosses :
<i class="fas fa-times"></i> <i class=" fa-times"></i> <i class=" fa-times"></i> <i class=" fa-times"></i>
And when is add the "fas" class manually in my Chrome, of course, it works.
Is this problem already known ? How can we fix this ?
Thanks !
I don't have time to work on this, but after a quick glance through the code, I think it might be as easy as changing this line to $this->style = 'fas';
Could you see if that works? And if it does, can you open a pull request to fix it for me?
This is fixed now, ya?
Hi,
The issue does not look like to be fixed. It does the same thing for me and I'm not even using the same icons:
<i class="fas fa-code"></i> <i class=" fa-user"></i>
Regards,
Andras