6.4.3 • Published 7 months ago
shoelace-fontawesome-pug v6.4.3
shoelace-fontawesome-pug
A Pug mixin to make it easier to load Font Awesome Pro icons with Shoelace.
Usage
- Install with NPM:
npm i shoelace-fontawesome-pug
- Anywhere in your Pug file, include this line:
include ../node_modules/shoelace-fontawesome-pug/sl-fa-mixin.pug
- When using a Shoelace Icon in Pug, ensure to set the correct library:
sl-icon(library='fa' name='fab-github')
What is this doing?
This mixin really just wraps the code recommended by Shoelace with a preset CDN for Font Awesome 6.4.0 icons.
How do I define icon styles?
Each icon style is determined with a simple prefix. In the example above, fab-github
uses the fab
prefix, indicating Font Awesome Brands
. The other prefixes follow the same convention:
Prefix | Style |
---|---|
fas- | Solid |
far- | Regular |
fal- | Light |
fat- | Thin |
fad- | Duotone |
fab- | Brands |
fass- | Sharp Solid |
fasr- | Sharp Regular |
fasl- | Sharp Light |