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: add SASS integration #5456

Closed
wants to merge 1 commit into from
Closed
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
19 changes: 19 additions & 0 deletions docs/documentation/stories/include-font-awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Include [Font Awesome](http://fontawesome.io/)

[Font Awesome](http://fontawesome.io/) gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.

Create a new project and navigate into the project...
```
ng new my-app
Expand All @@ -14,6 +15,8 @@ Install the `font-awesome` library and add the dependency to package.json...
npm install --save font-awesome
```

### Using CSS

To add Font Awesome CSS icons to your app...
```json
// in .angular-cli.json
Expand All @@ -23,6 +26,22 @@ To add Font Awesome CSS icons to your app...
"../node_modules/font-awesome/css/font-awesome.css"
]
```
### Using SASS

Create an empty file _variables.scss in src/.

Add the following to _variables.scss:

```
$fa-font-path : '../node_modules/font-awesome/fonts';
```
In styles.scss add the following:

```
@import 'variables';
@import '../node_modules/font-awesome/scss/font-awesome';
```
### Test

Run `ng serve` to run your application in develop mode, and navigate to `http://localhost:4200`.

Expand Down