Skip to content

Added dependencies to bootstrap article when using custom SCSS. #7462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 1, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docusaurus/docs/adding-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ 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-scss`:

```sh
yarn add node-scss
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you mean node-sass? Also please show the instructions for npm and yarn, similar to the bootstrap installation instructions.

```

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
Expand Down