|
1 | 1 | @use 'sass:color';
|
| 2 | +@use 'sass:map'; |
2 | 3 | @use 'sass:meta';
|
3 | 4 | @use '../core/theming/inspection';
|
4 | 5 | @use '../core/style/elevation';
|
| 6 | +@use '../core/tokens/m2-utils'; |
| 7 | +@use '../core/tokens/m3-utils'; |
5 | 8 |
|
6 | 9 | // Tokens that can't be configured through Angular Material's current theming API,
|
7 | 10 | // but may be in a future version of the theming API.
|
|
17 | 20 |
|
18 | 21 | // Tokens that can be configured through Angular Material's color theming API.
|
19 | 22 | @function get-color-tokens($theme) {
|
| 23 | + $system: m2-utils.get-system($theme); |
20 | 24 | $is-dark: inspection.get-theme-type($theme) == dark;
|
21 | 25 | $scrim-opacity: 0.6;
|
22 |
| - $scrim-color: inspection.get-theme-color($theme, system, surface, $scrim-opacity); |
| 26 | + $scrim-color: m3-utils.color-with-opacity(map.get($system, surface), 60%); |
23 | 27 | $fallback-scrim-color: if($is-dark, rgba(#fff, $scrim-opacity), rgba(#000, $scrim-opacity));
|
24 | 28 |
|
25 | 29 | @return (
|
26 |
| - sidenav-container-divider-color: inspection.get-theme-color($theme, system, outline), |
27 |
| - sidenav-container-background-color: inspection.get-theme-color($theme, system, surface), |
28 |
| - sidenav-container-text-color: inspection.get-theme-color($theme, system, on-surface), |
29 |
| - sidenav-content-background-color: inspection.get-theme-color($theme, background, background), |
30 |
| - sidenav-content-text-color: inspection.get-theme-color($theme, system, on-surface), |
| 30 | + sidenav-container-divider-color: map.get($system, outline), |
| 31 | + sidenav-container-background-color: map.get($system, surface), |
| 32 | + sidenav-container-text-color: map.get($system, on-surface), |
| 33 | + sidenav-content-background-color: map.get($system, background), |
| 34 | + sidenav-content-text-color: map.get($system, on-surface), |
31 | 35 |
|
32 | 36 | // We use invert() here to have the darken the background color expected to be used.
|
33 | 37 | // If the background is light, we use a dark backdrop. If the background is dark, we
|
|
0 commit comments