33
44$mat-date-range-input-separator-spacing : 4px ;
55$mat-date-range-input-part-max-width : calc (50% - #{$mat-date-range-input-separator-spacing } );
6- $mat-date-range-input-placeholder-transition :
7- color $swift-ease-out-duration $swift-ease-out-duration / 3 $swift-ease-out-timing-function ;
6+
7+ @mixin _mat-date-range-input-placeholder-transition ($property ) {
8+ transition : #{$property } $swift-ease-out-duration $swift-ease-out-duration / 3
9+ $swift-ease-out-timing-function ;
10+ }
811
912// Host of the date range input.
1013.mat-date-range-input {
@@ -20,15 +23,17 @@ $mat-date-range-input-placeholder-transition:
2023
2124// Text shown between the two inputs.
2225.mat-date-range-input-separator {
26+ @include _mat-date-range-input-placeholder-transition (opacity );
2327 margin : 0 $mat-date-range-input-separator-spacing ;
24- transition : $mat-date-range-input-placeholder-transition ;
2528}
2629
2730.mat-date-range-input-separator-hidden {
2831 // Disable text selection, because the user can click
2932 // through the main label when the input is disabled.
3033 @include user-select (none );
31- color : transparent ;
34+
35+ // Use opacity to hide the text, because `color: transparent` will be shown in high contrast mode.
36+ opacity : 0 ;
3237 transition : none ;
3338}
3439
@@ -54,7 +59,7 @@ $mat-date-range-input-placeholder-transition:
5459 }
5560
5661 @include input-placeholder {
57- transition : $mat -date-range-input-placeholder-transition ;
62+ @include _mat -date-range-input-placeholder-transition( color ) ;
5863 }
5964
6065 .mat-form-field-hide-placeholder & ,
0 commit comments