1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +01:00

source/scss: Only import parts of font-awesome that we actually need

We can save ~30KiB in our stylesheet by only importing font-awesome
features and icons that we are actually using.
This commit is contained in:
Alan Orth 2016-11-16 12:00:21 +02:00
parent 54bb4e52aa
commit 4d79004570
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 29 additions and 1 deletions

26
source/scss/font-awesome.scss vendored Normal file
View File

@ -0,0 +1,26 @@
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
@import "node_modules/font-awesome/scss/variables";
@import "node_modules/font-awesome/scss/mixins";
@import "node_modules/font-awesome/scss/path";
@import "node_modules/font-awesome/scss/core";
@import "node_modules/font-awesome/scss/larger";
@import "node_modules/font-awesome/scss/fixed-width";
//@import "list";
//@import "bordered-pulled";
//@import "animated";
//@import "rotated-flipped";
//@import "stacked";
//@import "icons";
// selectively import icons we need from font-awesome
// see: node_modules/font-awesome/scss/_icons.scss
.#{$fa-css-prefix}-tag:before { content: $fa-var-tag; }
.#{$fa-css-prefix}-folder:before { content: $fa-var-folder; }
.#{$fa-css-prefix}-facebook:before { content: $fa-var-facebook; }
.#{$fa-css-prefix}-google-plus:before { content: $fa-var-google-plus; }
.#{$fa-css-prefix}-linkedin:before { content: $fa-var-linkedin; }
.#{$fa-css-prefix}-twitter:before { content: $fa-var-twitter; }
@import "node_modules/font-awesome/scss/screen-reader";

View File

@ -5,7 +5,9 @@ $enable-grid-classes: true;
// optional: import local styles first // optional: import local styles first
@import 'source/scss/main.scss'; @import 'source/scss/main.scss';
@import 'node_modules/font-awesome/scss/font-awesome.scss'; // selectively import components we need from font-awesome
// see: node_modules/font-awesome/scss/font-awesome.scss
@import 'source/scss/font-awesome.scss';
// selectively import components we need from bootstrap // selectively import components we need from bootstrap
// see: node_modules/bootstrap/scss/bootstrap.scss // see: node_modules/bootstrap/scss/bootstrap.scss