mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore(checkbox): remove unnecessary will-change (#2743)
Removes a couple of unnecessary usages of `will-change` in the checkbox. They are redundant, because the properties being animated aren't problematic to transition in the first place (`border-color`, `background-color` and `opacity`). In general, we should avoid adding `will-change` like this, until we actually notice a performance issue, and even in that case it should be added right before an animation is supposed to happen.
This commit is contained in:
committed by
Andrew Seguin
parent
61a37d432d
commit
5b7698939e
@@ -240,7 +240,6 @@ md-checkbox {
|
||||
background-color: transparent;
|
||||
border: $md-checkbox-border-width solid;
|
||||
transition: border-color $md-checkbox-transition-duration $md-linear-out-slow-in-timing-function;
|
||||
will-change: border-color;
|
||||
}
|
||||
|
||||
.md-checkbox-background {
|
||||
@@ -252,7 +251,6 @@ md-checkbox {
|
||||
transition: background-color $md-checkbox-transition-duration
|
||||
$md-linear-out-slow-in-timing-function,
|
||||
opacity $md-checkbox-transition-duration $md-linear-out-slow-in-timing-function;
|
||||
will-change: background-color, opacity;
|
||||
}
|
||||
|
||||
.md-checkbox-checkmark {
|
||||
|
||||
Reference in New Issue
Block a user