aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2017-09-30 23:57:50 -0700
committerXhmikosR <[email protected]>2017-10-01 09:57:50 +0300
commite471ea0617559ab17ea3705b24e3ba55d9ad5fa9 (patch)
treed51300ee7e9f78b95fd9c9193cd0e279f360db28
parent499f9dc960cb2ab43f8b7b094cf874ae423ca18a (diff)
downloadbootstrap-e471ea0617559ab17ea3705b24e3ba55d9ad5fa9.tar.xz
bootstrap-e471ea0617559ab17ea3705b24e3ba55d9ad5fa9.zip
Updates to customizing variables docs (#24186)
* Variable overrides within the same Sass file can come before or after the default value, but across files they must come first. * Removed the double :: at the end of the paragraph. * Fixed usage of overwrite when we mean override.
-rw-r--r--docs/4.0/getting-started/options.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/4.0/getting-started/options.md b/docs/4.0/getting-started/options.md
index 3b9629f7f..5095997e3 100644
--- a/docs/4.0/getting-started/options.md
+++ b/docs/4.0/getting-started/options.md
@@ -8,18 +8,22 @@ toc: true
## Customizing variables
-Every Sass variable in Bootstrap 4 includes the `!default` flag, meaning you can override that default value in your own Sass. Copy and paste variables as needed, modify the values and remove the !default flag. If a variable has already been assigned, then it won't be re-assigned by the default values in Bootstrap. This means that your modified Sass variables should be called before you import Bootstrap Sass files. For example, to change out the `background-color` and `color` for the `<body>`, you'd do the following::
+Every Sass variable in Bootstrap 4 includes the `!default` flag allowing you to override the variable's default value in your own Sass without modifying Bootstrap's source code. Copy and paste variables as needed, modify their values, and remove the `!default` flag. If a variable has already been assigned, then it won't be re-assigned by the default values in Bootstrap.
+
+Variable overrides within the same Sass file can come before or after the default variables. However, when overriding across Sass files, your overrides must come before you import Bootstrap's Sass files.
+
+Here's an example that changes the `background-color` and `color` for the `<body>` when importing and compiling Bootstrap via npm:
{% highlight scss %}
-// Your variable overwrite first or a Sass file containing the modifications
+// Your variable overrides
$body-bg: #000;
$body-color: #111;
-// Then import Bootstrap
+// Bootstrap and its default variables
@import "node_modules/bootstrap/scss/bootstrap";
{% endhighlight %}
-Do the same for any variable you need to override, including the global options listed below.
+Repeat as necessary for any variable in Bootstrap, including the global options below.
## Global options