Moodle 3.3 with Font Awesome 5

Re: Moodle 3.3 with Font Awesome 5

by Adrian Perez Rodriguez -
Number of replies: 0

Hi

We import the FontAwesome CSS files with SCSS into our theme. So we renamed the original files to SCSS and make adaptions to the URL paths. After they're all imported together in to the scss/fontawesome-pro/fontawesome-pro.scss file:

@import "fontawesome-pro-core";
@import "fontawesome-pro-brands";
@import "fontawesome-pro-light";
@import "fontawesome-pro-regular";
@import "fontawesome-pro-solid";
@import "fontawesome-pro-svg-framework";
This file will then be imported into the theme (normally you have a SCSS collecting all your customization):
@import "fontawesome-pro/fontawesome-pro";
What you must fix additionally is the scss/fontawesome-pro/fontawesome-pro-solid.scss file, here you change:
.fa,.fas{font-family:'Font Awesome 5 Solid';font-weight:900} 

to 

.fa,.fas{font-family:'Font Awesome 5 Light' !important}
This is the "hack" to get all icons within Moodle with the FA Light style.


Hope this helps.
Adrian

Average of ratings: Useful (1)