Skip to content
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

docs: update bootstrap documentation to include SASS #4067

Merged
merged 1 commit into from
Jan 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/documentation/stories/include-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,29 @@ A quick test is to add the following markup to `app.component.html`
```
After saving this file, return to the browser to see the bootstrap styled button.

## Using SASS
Open `angular-cli.json` change reference of `styles.css` to `styles.scss` and rename the file accordingly.

Create an empty file `_variables.scss` in `src/`.

In `styles.scss` add the following:

```
@import '_variables';
@import '../node_modules/bootstrap/scss/bootstrap';
```

Open `app.component.html` and add the following markup
```
<button class="btn btn-primary">Test Button</button>
```
With the application configured, run `ng serve` to run your application in develop mode.
In your browser navigate to the application `localhost:4200`.
Verify the bootstrap styled button appears.
To ensure your variables are used open `_variables.scss` and add the following:
```
$body-color: red;
```
Return the browser to see the font color changed.

**Note:** When you make changes to `angular-cli.json` you will need to re-start `ng serve` to pick up configuration changes.