@@ -49,23 +49,27 @@ In your `custom.scss`, you'll import Bootstrap's source Sass files. You have two
4949// Custom.scss
5050// Option A: Include all of Bootstrap
5151
52+ // Include any default variable overrides here (though functions won't be available)
53+
5254@import " ../node_modules/bootstrap/scss/bootstrap" ;
5355
54- // Add custom code after this
56+ // Then add additional custom code here
5557```
5658
5759``` scss
5860// Custom.scss
5961// Option B: Include parts of Bootstrap
6062
61- // Required
63+ // 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
6264@import " ../node_modules/bootstrap/scss/functions" ;
65+
66+ // 2. Include any default variable overrides here
67+
68+ // 3. Include remainder of required Bootstrap stylesheets
6369@import " ../node_modules/bootstrap/scss/variables" ;
6470@import " ../node_modules/bootstrap/scss/mixins" ;
6571
66- // Include custom variable default overrides here
67-
68- // Optional
72+ // 4. Include any optional Bootstrap components as you like
6973@import " ../node_modules/bootstrap/scss/reboot" ;
7074@import " ../node_modules/bootstrap/scss/type" ;
7175@import " ../node_modules/bootstrap/scss/images" ;
@@ -86,18 +90,17 @@ Variable overrides must come after our functions, variables, and mixins are impo
8690Here's an example that changes the ` background-color ` and ` color ` for the ` <body> ` when importing and compiling Bootstrap via npm:
8791
8892``` scss
89- // Required
9093@import " ../node_modules/bootstrap/scss/functions" ;
91- @import " ../node_modules/bootstrap/scss/variables" ;
92- @import " ../node_modules/bootstrap/scss/mixins" ;
9394
94- // Your variable overrides
95+ // Default variable overrides
9596$body-bg : #000 ;
9697$body-color : #111 ;
9798
98- // Bootstrap and its default variables
99+ // Required
100+ @import " ../node_modules/bootstrap/scss/variables" ;
101+ @import " ../node_modules/bootstrap/scss/mixins" ;
99102
100- // Optional
103+ // Optional Bootstrap components here
101104@import " ../node_modules/bootstrap/scss/root" ;
102105@import " ../node_modules/bootstrap/scss/reboot" ;
103106@import " ../node_modules/bootstrap/scss/type" ;
0 commit comments