Skip to content

Commit 46ae3a2

Browse files
belevtinayuangao
authored andcommitted
docs(theming-your-components): improve theming your components docs (#2035)
* Fix typos. * Change highlighting from `sass` to `scss`. * Fix path to pre-built deeppurple-amber theme.
1 parent a8355e4 commit 46ae3a2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/theming-your-components.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Theming your custom components
1+
# Theming your custom components
22
In order to style your own components with Angular Material's tooling, the component's styles must be defined with Sass.
33

44
## Using `@mixin` to automatically apply a theme
@@ -12,7 +12,7 @@ We can better theming our custom components adding a `@mixin` function to its th
1212

1313
All you need is to create a `@mixin` function in the custom-component-theme.scss
1414

15-
```sass
15+
```scss
1616
// Import all the tools needed to customize the theme and extract parts of it
1717
@import '~@angular/material/core/theming/all-theme';
1818

@@ -29,11 +29,11 @@ All you need is to create a `@mixin` function in the custom-component-theme.scss
2929
}
3030
}
3131
```
32-
Now you just have have to call the `@mixin` function to apply the theme:
32+
Now you just have to call the `@mixin` function to apply the theme:
3333

34-
```sass
34+
```scss
3535
// Import a pre-built theme
36-
@import '~@angular/material/core/theming/prebuilt/deep-purple-amber';
36+
@import '~@angular/material/core/theming/prebuilt/deeppurple-amber';
3737
// Import your custom input theme file so you can call the custom-input-theme function
3838
@import 'app/candy-carousel/candy-carousel-theme.scss';
3939

@@ -52,8 +52,8 @@ All styles that are not affected by the theme should be placed in a `candy-carou
5252
Styles that are affected by the theme should be placed in a separated theming file as `_candy-carousel-theme.scss` and the file should have a `_` before the name. This file should contain the `@mixin` function responsible for applying the theme to the component.
5353

5454

55-
## Using colors from a pallete
56-
You can consume the theming functions from the `@angular/material/core/theming/theming` and Material pallete vars from `@angular/material/core/theming/palette`. You can use the `md-color` function to extract a specific color from a palette. For example:
55+
## Using colors from a palette
56+
You can consume the theming functions from the `@angular/material/core/theming/theming` and Material palette vars from `@angular/material/core/theming/palette`. You can use the `md-color` function to extract a specific color from a palette. For example:
5757

5858
```scss
5959
// Import theming functions

0 commit comments

Comments
 (0)