From 435ba0f7062268aa25e37d8f4b90c65cf13401c6 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 21 Sep 2016 08:29:27 +0300 Subject: [PATCH] Build a custom Bootstrap We don't use all the Bootstrap stuff, so let's just build a custom one with the components we need. This saves about 50k. --- source/scss/bootstrap.scss | 54 ++++++++++++++++++++++++++++++++++++++ source/scss/style.scss | 5 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 source/scss/bootstrap.scss diff --git a/source/scss/bootstrap.scss b/source/scss/bootstrap.scss new file mode 100644 index 0000000..db0a8a8 --- /dev/null +++ b/source/scss/bootstrap.scss @@ -0,0 +1,54 @@ +/*! + * Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com) + * Copyright 2011-2016 The Bootstrap Authors + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +// Core variables and mixins +@import "node_modules/bootstrap/scss/custom"; +@import "node_modules/bootstrap/scss/variables"; +@import "node_modules/bootstrap/scss/mixins"; + +// Reset and dependencies +@import "node_modules/bootstrap/scss/normalize"; +@import "node_modules/bootstrap/scss/print"; + +// Core CSS +@import "node_modules/bootstrap/scss/reboot"; +@import "node_modules/bootstrap/scss/type"; +@import "node_modules/bootstrap/scss/images"; +@import "node_modules/bootstrap/scss/code"; +@import "node_modules/bootstrap/scss/grid"; +//@import "node_modules/bootstrap/scss/tables"; +//@import "node_modules/bootstrap/scss/forms"; +//@import "node_modules/bootstrap/scss/buttons"; + +// Components +//@import "node_modules/bootstrap/scss/animation"; +//@import "node_modules/bootstrap/scss/dropdown"; +//@import "node_modules/bootstrap/scss/button-group"; +//@import "node_modules/bootstrap/scss/input-group"; +//@import "node_modules/bootstrap/scss/custom-forms"; +@import "node_modules/bootstrap/scss/nav"; +@import "node_modules/bootstrap/scss/navbar"; +//@import "node_modules/bootstrap/scss/card"; +//@import "node_modules/bootstrap/scss/breadcrumb"; +@import "node_modules/bootstrap/scss/pagination"; +//@import "node_modules/bootstrap/scss/tags"; +//@import "node_modules/bootstrap/scss/jumbotron"; +//@import "node_modules/bootstrap/scss/alert"; +//@import "node_modules/bootstrap/scss/progress"; +@import "node_modules/bootstrap/scss/media"; +@import "node_modules/bootstrap/scss/list-group"; +@import "node_modules/bootstrap/scss/responsive-embed"; +@import "node_modules/bootstrap/scss/close"; + +// Components w/ JavaScript +//@import "node_modules/bootstrap/scss/modal"; +//@import "node_modules/bootstrap/scss/tooltip"; +//@import "node_modules/bootstrap/scss/popover"; +//@import "node_modules/bootstrap/scss/carousel"; + +// Utility classes +@import "node_modules/bootstrap/scss/utilities"; diff --git a/source/scss/style.scss b/source/scss/style.scss index 8a92b4a..342151b 100644 --- a/source/scss/style.scss +++ b/source/scss/style.scss @@ -6,4 +6,7 @@ $enable-grid-classes: true; @import 'source/scss/main.scss'; @import 'node_modules/font-awesome/scss/font-awesome.scss'; -@import 'node_modules/bootstrap/scss/bootstrap.scss'; + +// selectively import components we need from bootstrap +// see: node_modules/bootstrap/scss/bootstrap.scss +@import 'source/scss/bootstrap.scss';