1
1
@import ' ../core/style/variables' ;
2
2
@import ' ../core/style/vendor-prefixes' ;
3
3
@import ' ../core/style/noop-animation' ;
4
+ @import ' ../../cdk/a11y/a11y' ;
4
5
5
6
$mat-progress-bar-height : 5px !default ;
6
7
$mat-progress-bar-full-animation-duration : 2000ms !default ;
@@ -30,6 +31,10 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
30
31
// The width is set to be 10px longer than the container as it will be translated 10px
31
32
// during the background scroll animation.
32
33
width : calc (100% + 10px );
34
+
35
+ @include cdk-high-contrast {
36
+ display : none ;
37
+ }
33
38
}
34
39
35
40
// The progress bar buffer is the bar indicator showing the buffer value and is only visible
@@ -38,6 +43,11 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
38
43
@include _noop-animation ();
39
44
transform-origin : top left ;
40
45
transition : transform $mat-progress-bar-piece-animation-duration ease ;
46
+
47
+ @include cdk-high-contrast {
48
+ border-top : solid 5px ;
49
+ opacity : 0.5 ;
50
+ }
41
51
}
42
52
43
53
// The secondary progress bar is only used in the indeterminate animation, because of this it
@@ -52,6 +62,10 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
52
62
animation : none ;
53
63
transform-origin : top left ;
54
64
transition : transform $mat-progress-bar-piece-animation-duration ease ;
65
+
66
+ @include cdk-high-contrast {
67
+ border-top : solid $mat-progress-bar-height ;
68
+ }
55
69
}
56
70
57
71
// A pseudo element is created for each progress bar bar that fills with the indicator color.
@@ -124,6 +138,10 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
124
138
@include backface-visibility (hidden );
125
139
animation : mat- progress- bar- background- scroll
126
140
$mat-progress-bar-piece-animation-duration infinite linear ;
141
+
142
+ // Needs to be explicit here so it can overwrite the `display: none`
143
+ // in all other variants in high contrast mode.
144
+ display : block ;
127
145
}
128
146
}
129
147
}
0 commit comments