A boilerplate wxss including fontawesome 5.xx
Simply clone this repo and paste the wxss for the font(s) you need into your mini program app.wxss file.
IMPORTANT Only the full file includes Font-Awesome css styling. If you choose the regular, solid, or brands font files, you MUST also use the font-awesome-css.wxss file or else you will not have any styling and your icons will not work!!!
File Sizes
- Full ~184kb
- Brands ~78.4kb*
- Regular ~18.4kb*
- Solid ~56.4kb*
- Font Awesome CSS ~31.4kb
*Must be used with Font Awesome CSS file!
Font Awesome 5 comes with a number of styles instead of a singular one as in FA4. This package includes the "solid", "regular", and "brands" styles (mix and match as you like).
To use a Font Awesome icon, simply apply this syntax:
<i class="far fa-shopping-cart fa-lg"></i>
or
<i class="far fa-shopping-cart fa-lg" />
far
means we're using the regular styling. fas
means "solid", fab
is for brand styling.
Read more about Font Awesome 5 usage here: