Skip to content

Commit 5d82484

Browse files
author
Bruno da Silva joão
authored
Update theming-your-components.md
Shortest example.
1 parent 5c1cc1b commit 5d82484

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

docs/theming-your-components.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In order to style your own components with our tooling, the component's styles must be defined with Sass.
44

5-
You can consume the theming functions from the `@angular/material/core/theming/all-theme` and theming variables from a pre-built theme or a custom one. You can use the `map-get` function to extract the theming variables and `md-color` function to extract a specific color from a palette.
5+
You can consume the theming functions from the `@angular/material/core/theming/all-theme` and theming variables from a pre-built theme or a custom one. You can use the `md-color` function to extract a specific color from a palette.
66
For example:
77

88
app/candy-carousel/candy-carousel-theme.scss
@@ -13,10 +13,6 @@ app/candy-carousel/candy-carousel-theme.scss
1313
// Import a pre-built theme
1414
@import '~@angular/material/core/theming/prebuilt/deep-purple-amber';
1515

16-
// Extract whichever individual palettes you need from the pre-built theme.
17-
$primary: map-get($theme, primary);
18-
$accent: map-get($theme, accent);
19-
2016
// Use md-color to extract individual colors from a palette as necessary.
2117
.candy-carousel {
2218
background-color: md-color($primary);

0 commit comments

Comments
 (0)