File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ $_indeterminate-duration: 2s;
114
114
z-index : -1 ; // Place behind tracks for Safari
115
115
}
116
116
117
+ // dots are hidden when indeterminate or when there is no visible buffer to
118
+ // prevent infinite invisible animation.
119
+ .dots [hidden ] {
120
+ display : none ;
121
+ }
122
+
117
123
// indeterminate
118
124
.indeterminate .bar {
119
125
transition : none ;
@@ -131,10 +137,6 @@ $_indeterminate-duration: 2s;
131
137
display : block ;
132
138
}
133
139
134
- .indeterminate .dots {
135
- display : none ;
136
- }
137
-
138
140
.indeterminate .primary-bar {
139
141
animation : linear infinite $_indeterminate-duration ;
140
142
animation-name : primary- indeterminate- translate;
Original file line number Diff line number Diff line change @@ -34,8 +34,12 @@ export class LinearProgress extends Progress {
34
34
} %)`,
35
35
} ;
36
36
37
+ // Only display dots when visible - this prevents invisible infinite
38
+ // animation.
39
+ const hideDots =
40
+ this . indeterminate || this . buffer >= this . max || this . value >= this . max ;
37
41
return html `
38
- < div class ="dots "> </ div >
42
+ < div class ="dots " ?hidden = ${ hideDots } > </ div >
39
43
< div class ="inactive-track " style =${ styleMap ( dotStyles ) } > </ div >
40
44
< div class ="bar primary-bar " style =${ styleMap ( progressStyles ) } >
41
45
< div class ="bar-inner "> </ div >
You can’t perform that action at this time.
0 commit comments