Skip to content

Commit 535dcf1

Browse files
timmoytinayuangao
authored andcommitted
docs(theming): Document hue options available for mat-color sass function (#9681)
* docs(theming): updated guide with proposed documentation * docs(theming): updated guide using theming.scss to indicate how the user can use the preconfigured hues as well as the contrast modifier. * docs(theming): typo fix
1 parent 5704615 commit 535dcf1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

guides/theming-your-components.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ You can use the `mat-color` function to extract a specific color from a palette.
6363
@import 'src/unicorn-app-theme.scss';
6464

6565
// Use mat-color to extract individual colors from a palette as necessary.
66+
// The hue can be one of the standard values (500, A400, etc.), one of the three preconfigured
67+
// hues (default, lighter, darker), or any of the aforementioned prefixed with "-contrast".
68+
// For example a hue of "darker-contrast" gives a light color to contrast with a "darker" hue
69+
// Available color palettes: https://www.google.com/design/spec/style/color.html
6670
.candy-carousel {
6771
background-color: mat-color($candy-app-primary);
6872
border-color: mat-color($candy-app-accent, A400);
73+
color: mat-color($candy-app-primary, darker);
6974
}
7075
```

guides/theming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ A typical theme file will look something like this:
7575

7676
// Define the palettes for your theme using the Material Design palettes available in palette.scss
7777
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
78-
// hue.
78+
// hue. Available color palettes: https://www.google.com/design/spec/style/color.html
7979
$candy-app-primary: mat-palette($mat-indigo);
8080
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
8181

0 commit comments

Comments
 (0)