@@ -49,23 +49,27 @@ In your `custom.scss`, you'll import Bootstrap's source Sass files. You have two
49
49
// Custom.scss
50
50
// Option A: Include all of Bootstrap
51
51
52
+ // Include any default variable overrides here (though functions won't be available)
53
+
52
54
@import " ../node_modules/bootstrap/scss/bootstrap" ;
53
55
54
- // Add custom code after this
56
+ // Then add additional custom code here
55
57
```
56
58
57
59
``` scss
58
60
// Custom.scss
59
61
// Option B: Include parts of Bootstrap
60
62
61
- // Required
63
+ // 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
62
64
@import " ../node_modules/bootstrap/scss/functions" ;
65
+
66
+ // 2. Include any default variable overrides here
67
+
68
+ // 3. Include remainder of required Bootstrap stylesheets
63
69
@import " ../node_modules/bootstrap/scss/variables" ;
64
70
@import " ../node_modules/bootstrap/scss/mixins" ;
65
71
66
- // Include custom variable default overrides here
67
-
68
- // Optional
72
+ // 4. Include any optional Bootstrap components as you like
69
73
@import " ../node_modules/bootstrap/scss/reboot" ;
70
74
@import " ../node_modules/bootstrap/scss/type" ;
71
75
@import " ../node_modules/bootstrap/scss/images" ;
@@ -86,18 +90,17 @@ Variable overrides must come after our functions, variables, and mixins are impo
86
90
Here's an example that changes the ` background-color ` and ` color ` for the ` <body> ` when importing and compiling Bootstrap via npm:
87
91
88
92
``` scss
89
- // Required
90
93
@import " ../node_modules/bootstrap/scss/functions" ;
91
- @import " ../node_modules/bootstrap/scss/variables" ;
92
- @import " ../node_modules/bootstrap/scss/mixins" ;
93
94
94
- // Your variable overrides
95
+ // Default variable overrides
95
96
$body-bg : #000 ;
96
97
$body-color : #111 ;
97
98
98
- // Bootstrap and its default variables
99
+ // Required
100
+ @import " ../node_modules/bootstrap/scss/variables" ;
101
+ @import " ../node_modules/bootstrap/scss/mixins" ;
99
102
100
- // Optional
103
+ // Optional Bootstrap components here
101
104
@import " ../node_modules/bootstrap/scss/root" ;
102
105
@import " ../node_modules/bootstrap/scss/reboot" ;
103
106
@import " ../node_modules/bootstrap/scss/type" ;
0 commit comments