|
1 | 1 | @import '../core/theming/palette'; |
2 | 2 | @import '../core/theming/theming'; |
| 3 | +@import '../core/style/form-common'; |
3 | 4 | @import '../core/typography/typography-utils'; |
4 | 5 |
|
5 | 6 |
|
|
9 | 10 | $warn: map-get($theme, warn); |
10 | 11 | $background: map-get($theme, background); |
11 | 12 | $foreground: map-get($theme, foreground); |
| 13 | + $is-dark-theme: map-get($theme, is-dark); |
12 | 14 |
|
13 | 15 | // Placeholder colors. Required is used for the `*` star shown in the placeholder. |
14 | | - $input-placeholder-color: mat-color($foreground, hint-text); |
| 16 | + $input-placeholder-color: mat-color($foreground, secondary-text); |
15 | 17 | $input-floating-placeholder-color: mat-color($primary); |
16 | 18 | $input-required-placeholder-color: mat-color($accent); |
17 | 19 |
|
18 | 20 | // Underline colors. |
19 | | - $input-underline-color: mat-color($foreground, divider); |
| 21 | + $input-underline-color: mat-color($foreground, divider, if($is-dark-theme, 0.7, 0.42)); |
20 | 22 | $input-underline-color-accent: mat-color($accent); |
21 | 23 | $input-underline-color-warn: mat-color($warn); |
22 | 24 | $input-underline-focused-color: mat-color($primary); |
|
25 | 27 | color: $input-placeholder-color; |
26 | 28 | } |
27 | 29 |
|
| 30 | + .mat-hint { |
| 31 | + color: mat-color($foreground, secondary-text); |
| 32 | + } |
| 33 | + |
28 | 34 | // :focus is applied to the input, but we apply mat-focused to the other elements |
29 | 35 | // that need to listen to it. |
30 | 36 | .mat-focused .mat-input-placeholder { |
|
40 | 46 | } |
41 | 47 |
|
42 | 48 | .mat-input-element:disabled { |
43 | | - color: mat-color($foreground, disabled-text); |
| 49 | + color: mat-color($foreground, secondary-text, if($is-dark-theme, 0.7, 0.42)); |
44 | 50 | } |
45 | 51 |
|
46 | 52 | // See _mat-input-placeholder-floating mixin in input-container.scss |
|
53 | 59 |
|
54 | 60 | .mat-input-underline { |
55 | 61 | background-color: $input-underline-color; |
| 62 | + |
| 63 | + &.mat-disabled { |
| 64 | + @include mat-control-disabled-underline($input-underline-color); |
| 65 | + } |
56 | 66 | } |
57 | 67 |
|
58 | 68 | .mat-input-ripple { |
|
0 commit comments