Open uok opened 5 years ago
+1 on this one
It would be really great if this is implemented, since Font Awesome now constantly releases new icons every couple of weeks. Since version 5.8.1 which is included with Storefront several 100 icons have been added/updated.
It would be so great if this change made it into the next release. Font Awesome v5.8.1 is from 2019-03-21, current version is 5.12.1 Thanks!
Came across this issue whilst looking for ways to load FA from our own CDN instead of the server.
I agree it would be better if enqueuing FA a different way, or detached to the styles would make things more flexible, so people can enqueue whichever version they like.
As there's currently no other solution we can think of, we resulted in dequeuing icons.css from Storefront, copying to our child theme and modifying the URLs.
As we load our CSS and JS from the CDN, changing the URLs from relative ../../../assets/fonts
to absolute /wp-content/themes/storefront/assets/fonts
seem to load the font from the CDN instead of our server.
Unfortunately, this is not a great solution because it won't work for sites nested in folders and we'll have to remember to update our version of icons.css every time Storefront is updated, but at least it seems to resolve our issue for now.
p.s our approach might help with #524
Thanks for the great Storefront theme!
When trying to use the latest Font Awesome via CDN, I noticed that currently it is only possible to use
wp_dequeue_style( 'storefront-icons' );
- but this removes font files AND icon definitions.My suggestion is to split the styles into icons.css (storefront-icons) and fontawesome.css (font-awesome) Then you can use e.g.
Thanks!