File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 37
37
display : none ;
38
38
}
39
39
40
+ @include input-placeholder {
41
+ // Delay the transition until the label has animated about a third of the way through, in
42
+ // order to prevent the placeholder from overlapping for a split second.
43
+ transition : color $swift-ease-out-duration $swift-ease-out-duration / 3
44
+ $swift-ease-out-timing-function ;
45
+ }
46
+
40
47
.mat-form-field-hide-placeholder & {
41
48
// Note that we can't use something like visibility: hidden or
42
49
// display: none, because IE ends up preventing the user from
45
52
// Needs to be !important, because the placeholder will end up inheriting the
46
53
// input color in IE, if the consumer overrides it with a higher specificity.
47
54
color : transparent !important ;
55
+
56
+ // Remove the transition to prevent the placeholder
57
+ // from overlapping when the label comes back down.
58
+ transition : none ;
48
59
}
49
60
}
50
61
}
Original file line number Diff line number Diff line change @@ -89,7 +89,16 @@ $mat-select-placeholder-arrow-space: 2 * ($mat-select-arrow-size + $mat-select-a
89
89
}
90
90
91
91
.mat-select-placeholder {
92
+ // Delay the transition until the label has animated about a third of the way through, in
93
+ // order to prevent the placeholder from overlapping for a split second.
94
+ transition : color $swift-ease-out-duration $swift-ease-out-duration / 3
95
+ $swift-ease-out-timing-function ;
96
+
92
97
.mat-form-field-hide-placeholder & {
93
98
color : transparent ;
99
+
100
+ // Remove the transition to prevent the placeholder
101
+ // from overlapping when the label comes back down.
102
+ transition : none ;
94
103
}
95
104
}
You can’t perform that action at this time.
0 commit comments