Font Awesome - Mixin
Contents
This article shows how to use Font Awesome with mixins better.
Import Font Awesome
First of all, in your vedors folder, the _fontawesome.scss
, import only what you need from node_modules
for the project.
|
|
Note
Dont forget! Use the
@import "../route"
depending on your project.Then you need to import Font Awesome from vendors folder intro your main.scss
.
|
|
The Mixin
You have the @extend
so it get’s you the icons from Font Awesome and also the solid ones.
Then the $is-after
is basically wheather or not the icon that you want to include inside a component has an :after
or :before
already.
|
|
The use case of the mixin
|
|