|
14 | 14 |
|
15 | 15 | // Placeholder colors. Required is used for the `*` star shown in the placeholder. |
16 | 16 | $placeholder-color: mat-color($foreground, secondary-text); |
17 | | - $floating-placeholder-color: mat-color($primary); |
| 17 | + $focused-placeholder-color: mat-color($primary); |
18 | 18 | $required-placeholder-color: mat-color($accent); |
19 | 19 |
|
20 | 20 | // Underline colors. |
|
32 | 32 | } |
33 | 33 |
|
34 | 34 | .mat-focused .mat-form-field-placeholder { |
35 | | - color: $floating-placeholder-color; |
| 35 | + color: $focused-placeholder-color; |
36 | 36 |
|
37 | 37 | &.mat-accent { |
38 | 38 | color: $underline-color-accent; |
|
42 | 42 | color: $underline-color-warn; |
43 | 43 | } |
44 | 44 | } |
45 | | - |
46 | | - .mat-form-field-autofill-float:-webkit-autofill + .mat-form-field-placeholder, |
47 | | - .mat-focused .mat-form-field-placeholder.mat-form-field-float { |
48 | | - .mat-form-field-required-marker { |
49 | | - color: $required-placeholder-color; |
50 | | - } |
| 45 | + |
| 46 | + .mat-focused .mat-form-field-required-marker { |
| 47 | + color: $required-placeholder-color; |
51 | 48 | } |
52 | 49 |
|
53 | 50 | .mat-form-field-underline { |
|
78 | 75 | color: $underline-color-warn; |
79 | 76 |
|
80 | 77 | &.mat-accent, |
81 | | - &.mat-form-field-float .mat-form-field-required-marker { |
| 78 | + .mat-form-field-required-marker { |
82 | 79 | color: $underline-color-warn; |
83 | 80 | } |
84 | 81 | } |
|
178 | 175 | border-top: $infix-margin-top solid transparent; |
179 | 176 | } |
180 | 177 |
|
181 | | - .mat-form-field-autofill-float { |
182 | | - &:-webkit-autofill + .mat-form-field-placeholder-wrapper .mat-form-field-float { |
| 178 | + .mat-form-field-can-float { |
| 179 | + &.mat-form-field-should-float .mat-form-field-placeholder, |
| 180 | + .mat-form-field-autofill-float:-webkit-autofill + .mat-form-field-placeholder-wrapper |
| 181 | + .mat-form-field-placeholder { |
183 | 182 | @include _mat-form-field-placeholder-floating( |
184 | 183 | $subscript-font-scale, $infix-padding, $infix-margin-top); |
185 | 184 | } |
|
192 | 191 |
|
193 | 192 | .mat-form-field-placeholder { |
194 | 193 | top: $infix-margin-top + $infix-padding; |
195 | | - |
196 | | - // Show the placeholder above the control when it's not empty, or focused. |
197 | | - &.mat-form-field-float:not(.mat-form-field-empty), |
198 | | - .mat-focused &.mat-form-field-float { |
199 | | - @include _mat-form-field-placeholder-floating($subscript-font-scale, |
200 | | - $infix-padding, $infix-margin-top); |
201 | | - } |
202 | 194 | } |
203 | 195 |
|
204 | 196 | .mat-form-field-underline { |
|
0 commit comments