|
1 | 1 | @use 'sass:map'; |
2 | | -@use '../core/tokens/m2-utils'; |
3 | 2 | @use '../core/theming/inspection'; |
4 | 3 | @use '../core/theming/theming'; |
5 | 4 | @use '../core/style/elevation'; |
|
16 | 15 | // Tokens that can be configured through Angular Material's color theming API. |
17 | 16 | @function get-color-tokens($theme, $palette-name: primary) { |
18 | 17 | $is-dark: inspection.get-theme-type($theme) == dark; |
19 | | - |
20 | | - // Ideally we would derive all values directly from the theme, but it causes a lot of regressions |
21 | | - // internally. For now we fall back to the old hardcoded behavior only for internal apps. |
22 | | - $on-surface: if($is-dark, #fff, #000); |
23 | | - $text-color-base: if(m2-utils.$private-is-internal-build, $on-surface, |
24 | | - inspection.get-theme-color($theme, foreground, text, 1)); |
25 | | - $disabled-text-color-base: if(m2-utils.$private-is-internal-build, $on-surface, |
26 | | - inspection.get-theme-color($theme, foreground, disabled-text, 1)); |
27 | | - $icon-color-base: if(m2-utils.$private-is-internal-build, $on-surface, |
28 | | - inspection.get-theme-color($theme, foreground, base)); |
| 18 | + $text-color-base: inspection.get-theme-color($theme, foreground, text, 1); |
| 19 | + $disabled-text-color-base: inspection.get-theme-color($theme, foreground, disabled-text, 1); |
| 20 | + $icon-color-base: inspection.get-theme-color($theme, foreground, base); |
29 | 21 |
|
30 | 22 | @return ( |
31 | 23 | select-panel-background-color: inspection.get-theme-color($theme, system, surface), |
|
0 commit comments