|
1 | 1 | @use '../core/m2/palette' as m2-palette;
|
2 | 2 | @use '../core/style/sass-utils';
|
| 3 | +@use '../core/tokens/m2-utils'; |
3 | 4 | @use '../core/theming/inspection';
|
4 | 5 | @use '../core/theming/theming';
|
5 |
| -@use '../core/tokens/m2-utils'; |
6 | 6 | @use 'sass:color';
|
7 | 7 | @use 'sass:map';
|
8 | 8 | @use 'sass:math';
|
|
30 | 30 | $warn-color: inspection.get-theme-color($theme, warn);
|
31 | 31 | $color-tokens: private-get-color-palette-color-tokens($theme, primary);
|
32 | 32 | $on-surface: if($is-dark, #fff, #000);
|
33 |
| - |
34 |
| - // Ideally we would derive all values directly from the theme, but it causes a lot of regressions |
35 |
| - // internally. For now we fall back to the old hardcoded behavior only for internal apps. |
36 |
| - $on-surface: if($is-dark, #fff, #000); |
37 |
| - $text-color-base: if(m2-utils.$private-is-internal-build, $on-surface, |
38 |
| - inspection.get-theme-color($theme, foreground, text, 1)); |
39 |
| - $disabled-text-color-base: if(m2-utils.$private-is-internal-build, $on-surface, |
40 |
| - inspection.get-theme-color($theme, foreground, disabled-text, 1)); |
41 |
| - $divider-base: if(m2-utils.$private-is-internal-build, $on-surface, |
42 |
| - inspection.get-theme-color($theme, foreground, base)); |
| 33 | + $text-color-base: inspection.get-theme-color($theme, system, on-surface); |
| 34 | + $disabled-text-color-base: inspection.get-theme-color($theme, foreground, disabled-text, 1); |
| 35 | + $divider-base: inspection.get-theme-color($theme, foreground, base); |
43 | 36 |
|
44 | 37 | @return map.merge($color-tokens, (
|
45 | 38 | // MDC has a token for the enabled placeholder, but not for the disabled one.
|
|
0 commit comments