|
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 | | - $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); |
| 33 | + $disabled: inspection.get-theme-color($theme, foreground, base, 0.38); |
36 | 34 |
|
37 | 35 | @return map.merge($color-tokens, ( |
38 | 36 | // MDC has a token for the enabled placeholder, but not for the disabled one. |
|
73 | 71 | form-field-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity), |
74 | 72 | form-field-filled-container-color: _variable-safe-mix($on-surface, $surface, 4%), |
75 | 73 | form-field-filled-disabled-container-color: _variable-safe-mix($on-surface, $surface, 2%), |
76 | | - form-field-filled-label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6), |
| 74 | + form-field-filled-label-text-color: inspection.get-theme-color($theme, foreground, base, 0.6), |
77 | 75 | form-field-filled-hover-label-text-color: |
78 | | - sass-utils.safe-color-change($text-color-base, $alpha: 0.6), |
| 76 | + inspection.get-theme-color($theme, foreground, base, 0.6), |
79 | 77 | form-field-filled-disabled-label-text-color: |
80 | | - sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38), |
| 78 | + inspection.get-theme-color($theme, foreground, base, 0.38), |
81 | 79 | form-field-filled-input-text-color: |
82 | | - sass-utils.safe-color-change($text-color-base, $alpha: 0.87), |
| 80 | + inspection.get-theme-color($theme, foreground, base, 0.87), |
83 | 81 | form-field-filled-disabled-input-text-color: |
84 | | - sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38), |
| 82 | + inspection.get-theme-color($theme, foreground, base, 0.38), |
85 | 83 | form-field-filled-input-text-placeholder-color: |
86 | | - sass-utils.safe-color-change($text-color-base, $alpha: 0.6), |
| 84 | + inspection.get-theme-color($theme, foreground, base, 0.6), |
87 | 85 | form-field-filled-error-hover-label-text-color: $warn-color, |
88 | 86 | form-field-filled-error-focus-label-text-color: $warn-color, |
89 | 87 | form-field-filled-error-label-text-color: $warn-color, |
90 | 88 | form-field-filled-error-caret-color: $warn-color, |
91 | 89 | form-field-filled-active-indicator-color: |
92 | | - sass-utils.safe-color-change($divider-base, $alpha: 0.42), |
| 90 | + inspection.get-theme-color($theme, foreground, base, 0.42), |
93 | 91 | form-field-filled-disabled-active-indicator-color: |
94 | | - sass-utils.safe-color-change($divider-base, $alpha: 0.06), |
| 92 | + inspection.get-theme-color($theme, foreground, base, 0.06), |
95 | 93 | form-field-filled-hover-active-indicator-color: |
96 | | - sass-utils.safe-color-change($divider-base, $alpha: 0.87), |
| 94 | + inspection.get-theme-color($theme, foreground, base, 0.87), |
97 | 95 | form-field-filled-error-active-indicator-color: $warn-color, |
98 | 96 | form-field-filled-error-focus-active-indicator-color: $warn-color, |
99 | 97 | form-field-filled-error-hover-active-indicator-color: $warn-color, |
100 | 98 | form-field-outlined-label-text-color: |
101 | | - sass-utils.safe-color-change($text-color-base, $alpha: 0.6), |
| 99 | + inspection.get-theme-color($theme, foreground, base, 0.6), |
102 | 100 | form-field-outlined-hover-label-text-color: |
103 | | - sass-utils.safe-color-change($text-color-base, $alpha: 0.6), |
| 101 | + inspection.get-theme-color($theme, foreground, base, 0.6), |
104 | 102 | form-field-outlined-disabled-label-text-color: |
105 | | - sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38), |
| 103 | + inspection.get-theme-color($theme, foreground, base, 0.38), |
106 | 104 | form-field-outlined-input-text-color: |
107 | | - sass-utils.safe-color-change($text-color-base, $alpha: 0.87), |
| 105 | + inspection.get-theme-color($theme, foreground, base, 0.87), |
108 | 106 | form-field-outlined-disabled-input-text-color: |
109 | | - sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38), |
| 107 | + inspection.get-theme-color($theme, foreground, base, 0.38), |
110 | 108 | form-field-outlined-input-text-placeholder-color: |
111 | | - sass-utils.safe-color-change($text-color-base, $alpha: 0.6), |
| 109 | + inspection.get-theme-color($theme, foreground, base, 0.6), |
112 | 110 | form-field-outlined-error-caret-color: $warn-color, |
113 | 111 | form-field-outlined-error-focus-label-text-color: $warn-color, |
114 | 112 | form-field-outlined-error-label-text-color: $warn-color, |
115 | 113 | form-field-outlined-error-hover-label-text-color: $warn-color, |
116 | | - form-field-outlined-outline-color: sass-utils.safe-color-change($divider-base, $alpha: 0.38), |
| 114 | + form-field-outlined-outline-color: inspection.get-theme-color($theme, foreground, base, 0.38), |
117 | 115 | form-field-outlined-disabled-outline-color: |
118 | | - sass-utils.safe-color-change($divider-base, $alpha: 0.06), |
| 116 | + inspection.get-theme-color($theme, foreground, base, 0.06), |
119 | 117 | form-field-outlined-hover-outline-color: |
120 | | - sass-utils.safe-color-change($divider-base, $alpha: 0.87), |
| 118 | + inspection.get-theme-color($theme, foreground, base, 0.87), |
121 | 119 | form-field-outlined-error-focus-outline-color: $warn-color, |
122 | 120 | form-field-outlined-error-hover-outline-color: $warn-color, |
123 | 121 | form-field-outlined-error-outline-color: $warn-color, |
|
134 | 132 | // Generates the mapping for the properties that change based on the form field color. |
135 | 133 | @function private-get-color-palette-color-tokens($theme, $palette-name) { |
136 | 134 | $palette-color: inspection.get-theme-color($theme, $palette-name); |
| 135 | + $text-color: inspection.get-theme-color($theme, $palette-name, 0.87); |
137 | 136 |
|
138 | 137 | @return ( |
139 | | - form-field-focus-select-arrow-color: sass-utils.safe-color-change($palette-color, $alpha: 0.87), |
| 138 | + form-field-focus-select-arrow-color: $text-color, |
140 | 139 | form-field-filled-caret-color: $palette-color, |
141 | 140 | form-field-filled-focus-active-indicator-color: $palette-color, |
142 | | - form-field-filled-focus-label-text-color: |
143 | | - sass-utils.safe-color-change($palette-color, $alpha: 0.87), |
| 141 | + form-field-filled-focus-label-text-color: $text-color, |
144 | 142 | form-field-outlined-caret-color: $palette-color, |
145 | 143 | form-field-outlined-focus-outline-color: $palette-color, |
146 | | - form-field-outlined-focus-label-text-color: |
147 | | - sass-utils.safe-color-change($palette-color, $alpha: 0.87), |
| 144 | + form-field-outlined-focus-label-text-color: $text-color, |
148 | 145 | ); |
149 | 146 | } |
150 | 147 |
|
|
0 commit comments