Skip to content

fix(material/progress-bar): changing the value repaints other progress bars #23129

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

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions src/material/progress-bar/progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
transform-origin: top left;
transition: transform $mat-progress-bar-piece-animation-duration ease;

// Prevents elements from extra repainting due to `transition`.
will-change: transform;
z-index: 1;
Copy link
Member

@crisbeto crisbeto Jul 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried it out, but I can see the other progress bars repainting even after these changes. Would it make sense to put a translateZ(0) on the parent instead? Also for what it's worth, I'm sure what performance implications this would have, considering that the element is relatively small and you usually only have one of them at a time.


@include cdk-high-contrast(active, off) {
border-top: solid $mat-progress-bar-height;
}
Expand Down