Skip to content

fix(progress-bar): query state animation not working #11459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/lib/progress-bar/progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
// The progress bar buffer is the bar indicator showing the buffer value and is only visible
// beyond the current value of the primary progress bar.
.mat-progress-bar-buffer {
@include _noop-animation();
transform-origin: top left;
transition: transform $mat-progress-bar-piece-animation-duration ease;

Expand All @@ -58,7 +57,6 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;

// The progress bar fill fills the progress bar with the indicator color.
.mat-progress-bar-fill {
@include _noop-animation();
animation: none;
transform-origin: top left;
transition: transform $mat-progress-bar-piece-animation-duration ease;
Expand All @@ -70,7 +68,6 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;

// A pseudo element is created for each progress bar bar that fills with the indicator color.
.mat-progress-bar-fill::after {
@include _noop-animation();
animation: none;
content: '';
display: inline-block;
Expand All @@ -95,27 +92,23 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
&[mode='indeterminate'],
&[mode='query'] {
.mat-progress-bar-fill {
@include _noop-animation();
transition: none;
}
.mat-progress-bar-primary {
// Avoids stacked animation tearing in Firefox >= 57.
@include _noop-animation();
@include backface-visibility(hidden);
animation: mat-progress-bar-primary-indeterminate-translate
$mat-progress-bar-full-animation-duration infinite linear;
left: -145.166611%;
}
.mat-progress-bar-primary.mat-progress-bar-fill::after {
// Avoids stacked animation tearing in Firefox >= 57.
@include _noop-animation();
@include backface-visibility(hidden);
animation: mat-progress-bar-primary-indeterminate-scale
$mat-progress-bar-full-animation-duration infinite linear;
}
.mat-progress-bar-secondary {
// Avoids stacked animation tearing in Firefox >= 57.
@include _noop-animation();
@include backface-visibility(hidden);
animation: mat-progress-bar-secondary-indeterminate-translate
$mat-progress-bar-full-animation-duration infinite linear;
Expand All @@ -124,7 +117,6 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
}
.mat-progress-bar-secondary.mat-progress-bar-fill::after {
// Avoids stacked animation tearing in Firefox >= 57.
@include _noop-animation();
@include backface-visibility(hidden);
animation: mat-progress-bar-secondary-indeterminate-scale
$mat-progress-bar-full-animation-duration infinite linear;
Expand All @@ -134,7 +126,6 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
&[mode='buffer'] {
.mat-progress-bar-background {
// Avoids stacked animation tearing in Firefox >= 57.
@include _noop-animation();
@include backface-visibility(hidden);
animation: mat-progress-bar-background-scroll
$mat-progress-bar-piece-animation-duration infinite linear;
Expand All @@ -144,6 +135,21 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
display: block;
}
}

// Disabled animations handling.
&._mat-animation-noopable {
.mat-progress-bar-fill,
.mat-progress-bar-fill::after,
.mat-progress-bar-buffer,
.mat-progress-bar-primary,
.mat-progress-bar-primary.mat-progress-bar-fill::after,
.mat-progress-bar-secondary,
.mat-progress-bar-secondary.mat-progress-bar-fill::after,
.mat-progress-bar-background {
animation: none;
transition: none;
}
}
}


Expand Down