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 3737 display : none ;
3838 }
3939
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+
4047 .mat-form-field-hide-placeholder & {
4148 // Note that we can't use something like visibility: hidden or
4249 // display: none, because IE ends up preventing the user from
4552 // Needs to be !important, because the placeholder will end up inheriting the
4653 // input color in IE, if the consumer overrides it with a higher specificity.
4754 color : transparent !important ;
55+
56+ // Remove the transition to prevent the placeholder
57+ // from overlapping when the label comes back down.
58+ transition : none ;
4859 }
4960 }
5061}
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
8989}
9090
9191.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+
9297 .mat-form-field-hide-placeholder & {
9398 color : transparent ;
99+
100+ // Remove the transition to prevent the placeholder
101+ // from overlapping when the label comes back down.
102+ transition : none ;
94103 }
95104}
You can’t perform that action at this time.
0 commit comments