1
- @import ' ../core/style/variables' ;
2
-
3
-
4
1
$md-progress-bar-height : 5px !default ;
5
2
$md-progress-bar-full-animation-duration : 2000ms !default ;
6
3
$md-progress-bar-piece-animation-duration : 250ms !default ;
@@ -17,51 +14,46 @@ $md-progress-bar-piece-animation-duration: 250ms !default;
17
14
transition : opacity $md-progress-bar-piece-animation-duration linear ;
18
15
width : 100% ;
19
16
17
+ // Base styles that are re-used across all of the progress bar children.
18
+ .md-progress-bar-element , .md-progress-bar-fill ::after {
19
+ height : 100% ;
20
+ position : absolute ;
21
+ width : 100% ;
22
+ }
23
+
20
24
// The progress bar background is used to show the bubble animation scrolling behind a
21
25
// buffering progress bar.
22
26
.md-progress-bar-background {
23
27
background-repeat : repeat-x ;
24
28
background-size : 10px 4px ;
25
- height : 100% ;
26
- position : absolute ;
27
- visibility : hidden ;
28
- width : 100% ;
29
+ display : none ;
29
30
}
30
31
31
32
// The progress bar buffer is the bar indicator showing the buffer value and is only visible
32
33
// beyond the current value of the primary progress bar.
33
34
.md-progress-bar-buffer {
34
- height : 100% ;
35
- position : absolute ;
36
35
transform-origin : top left ;
37
36
transition : transform $md-progress-bar-piece-animation-duration ease ;
38
- width : 100% ;
39
37
}
40
38
41
- // The secondary progress bar is only used in the indeterminate animation, because of this it
42
- // is hidden in other uses.
39
+ // The secondary progress bar is only used in the indeterminate animation, because of this it
40
+ // is hidden in other uses.
43
41
.md-progress-bar-secondary {
44
- visibility : hidden ;
42
+ display : none ;
45
43
}
46
44
47
45
// The progress bar fill fills the progress bar with the indicator color.
48
46
.md-progress-bar-fill {
49
47
animation : none ;
50
- height : 100% ;
51
- position : absolute ;
52
48
transform-origin : top left ;
53
49
transition : transform $md-progress-bar-piece-animation-duration ease ;
54
- width : 100% ;
55
50
}
56
51
57
52
// A pseudo element is created for each progress bar bar that fills with the indicator color.
58
53
.md-progress-bar-fill ::after {
59
54
animation : none ;
60
55
content : ' ' ;
61
56
display : inline-block ;
62
- height : 100% ;
63
- position : absolute ;
64
- width : 100% ;
65
57
left : 0 ;
66
58
}
67
59
@@ -84,7 +76,7 @@ $md-progress-bar-piece-animation-duration: 250ms !default;
84
76
.md-progress-bar-secondary {
85
77
animation : md- progress- bar- secondary- indeterminate- translate $md-progress-bar-full-animation-duration infinite linear ;
86
78
left : -54.888891% ;
87
- visibility : visible ;
79
+ display : block ;
88
80
}
89
81
.md-progress-bar-secondary.md-progress-bar-fill ::after {
90
82
animation : md- progress- bar- secondary- indeterminate- scale $md-progress-bar-full-animation-duration infinite linear ;
@@ -94,7 +86,7 @@ $md-progress-bar-piece-animation-duration: 250ms !default;
94
86
& [mode = ' buffer' ] {
95
87
.md-progress-bar-background {
96
88
animation : md- progress- bar- background- scroll $md-progress-bar-piece-animation-duration infinite linear ;
97
- visibility : visible ;
89
+ display : block ;
98
90
}
99
91
}
100
92
}
@@ -114,7 +106,7 @@ $md-progress-bar-piece-animation-duration: 250ms !default;
114
106
// mirrors the primary progress bar in appearance but is only shown to assist with the
115
107
// indeterminate animations.
116
108
117
- // KEYFRAME BLOCK DESCRIPTION
109
+ // KEYFRAME BLOCK DESCRIPTION
118
110
// primary-indeterminate-translate Translation of the primary progressbar across the screen
119
111
// primary-indeterminate-scale Scaling of the primary bar as it's being translated across the screen
120
112
// secondary-indeterminate-translate Translation of the secondary bar across the screen
0 commit comments