-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve bootstrap docs when using custom SCSS (#7462)
* Added dependencies to bootstrap article when using custom SCSS. * Make changes to package designation and added npm install directions.
- Loading branch information
1 parent
b96ac6c
commit 032cdf7
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,18 @@ import 'bootstrap/dist/css/bootstrap.css'; | |
Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> | ||
As of `[email protected]` you can import `.scss` files. This makes it possible to use a package's built-in Sass variables for global style preferences. | ||
|
||
To enable `scss` in Create React App you will need to install `node-sass`. | ||
|
||
```sh | ||
npm install --save node-sass | ||
``` | ||
|
||
Alternatively you may use `yarn`:: | ||
|
||
```sh | ||
yarn add node-sass | ||
``` | ||
|
||
To customize Bootstrap, create a file called `src/custom.scss` (or similar) and import the Bootstrap source stylesheet. Add any overrides _before_ the imported file(s). You can reference [Bootstrap's documentation](https://getbootstrap.com/docs/4.1/getting-started/theming/#css-variables) for the names of the available variables. | ||
|
||
```scss | ||
|