-
Notifications
You must be signed in to change notification settings - Fork 12k
docs: update stories featuring bootstrap #10122
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,7 @@ With the new project created and ready you will next need to install bootstrap t | |
Using the `--save` option the dependency will be saved in package.json | ||
|
||
```sh | ||
# version 3.x | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we typically add instructions for adding old packages to projects? I'd suggest we remove the v.3 installation notes altogether. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. You are right. I updated the PR. |
||
npm install bootstrap --save | ||
|
||
# version 4.x | ||
npm install bootstrap@next --save | ||
``` | ||
|
||
### Configuring Project | ||
|
@@ -74,33 +70,19 @@ cd my-app | |
### Installing Bootstrap | ||
|
||
```sh | ||
# version 3.x | ||
npm install bootstrap-sass --save | ||
|
||
# version 4.x | ||
npm install bootstrap@next --save | ||
npm install bootstrap --save | ||
``` | ||
|
||
### Configuring Project | ||
|
||
Create an empty file `_variables.scss` in `src/`. | ||
|
||
If you are using `bootstrap-sass`, add the following to `_variables.scss`: | ||
|
||
```sass | ||
$icon-font-path: '../node_modules/bootstrap-sass/assets/fonts/bootstrap/'; | ||
``` | ||
Create an empty file `_variables.scss` in `src/`. The `_variables.scss` file allows us to customize Bootstrap by overriding Sass variables | ||
used by Boostrap. For instance, you can add `$primary: red;` to use red as primary color. | ||
|
||
In `styles.scss` add the following: | ||
|
||
```sass | ||
// version 3 | ||
@import 'variables'; | ||
@import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap'; | ||
|
||
// version 4 | ||
@import 'variables'; | ||
@import '../node_modules/bootstrap/scss/bootstrap'; | ||
@import '~bootstrap/scss/bootstrap'; | ||
``` | ||
|
||
### Testing Project | ||
|
@@ -117,10 +99,6 @@ Verify the bootstrap styled button appears. | |
To ensure your variables are used open `_variables.scss` and add the following: | ||
|
||
```sass | ||
// version 3 | ||
$brand-primary: red; | ||
|
||
// version 4 | ||
$primary: red; | ||
``` | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not something you added, but can we add that neither
jquery
norpopper.js
are needed if you pretend to use only CSS? With the current docs people tend to feel that they have to install them obligatory.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally agree with you. I will update my PR accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR. Tell me what you think about the changes.