@@ -30,17 +30,9 @@ $prefix: (mat, form-field);
30
30
$surface : inspection .get-theme-color ($theme , background , card );
31
31
$warn-color : inspection .get-theme-color ($theme , warn );
32
32
$color-tokens : private-get-color-palette-color-tokens ($theme , primary );
33
- $on-surface : if ($is-dark , #fff , #000 );
34
-
35
- // Ideally we would derive all values directly from the theme, but it causes a lot of regressions
36
- // internally. For now we fall back to the old hardcoded behavior only for internal apps.
37
- $on-surface : if ($is-dark , #fff , #000 );
38
- $text-color-base : if (m2-utils .$private-is-internal-build , $on-surface ,
39
- inspection .get-theme-color ($theme , foreground , text , 1 ));
40
- $disabled-text-color-base : if (m2-utils .$private-is-internal-build , $on-surface ,
41
- inspection .get-theme-color ($theme , foreground , disabled-text , 1 ));
42
- $divider-base : if (m2-utils .$private-is-internal-build , $on-surface ,
43
- inspection .get-theme-color ($theme , foreground , divider , 1 ));
33
+ $text-color-base : inspection .get-theme-color ($theme , foreground , text , 1 );
34
+ $disabled-text-color-base : inspection .get-theme-color ($theme , foreground , disabled-text , 1 );
35
+ $divider-base : inspection .get-theme-color ($theme , foreground , divider , 1 );
44
36
45
37
@return map .merge ($color-tokens , (
46
38
// MDC has a token for the enabled placeholder, but not for the disabled one.
@@ -76,8 +68,8 @@ $prefix: (mat, form-field);
76
68
disabled- select- arrow- color: inspection .get-theme-color ($theme , foreground , icon , 0.38 ),
77
69
hover- state- layer- opacity: if ($is-dark , 0.08 , 0.04 ),
78
70
focus- state- layer- opacity: if ($is-dark , 0.24 , 0.08 ),
79
- filled- container- color: _variable-safe-mix ($on-surface , $surface , 4% ),
80
- filled- disabled- container- color: _variable-safe-mix ($on-surface , $surface , 2% ),
71
+ filled- container- color: _variable-safe-mix ($text-color-base , $surface , 4% ),
72
+ filled- disabled- container- color: _variable-safe-mix ($text-color-base , $surface , 2% ),
81
73
filled- label- text- color: sass-utils .safe-color-change ($text-color-base , $alpha : 0.6 ),
82
74
filled- hover- label- text- color: sass-utils .safe-color-change ($text-color-base , $alpha : 0.6 ),
83
75
filled- disabled- label- text- color:
0 commit comments