Skip to content

Commit

Permalink
fix(chips): Add delay to filter chip checkmark (#2804)
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanG23 authored and patrickrodee committed May 29, 2018
1 parent 2f13286 commit 9e35b1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/mdc-chips/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ $mdc-chip-trailing-icon-hover-opacity: .62;
$mdc-chip-trailing-icon-focus-opacity: .87;
$mdc-chip-leading-icon-size: 20px;
$mdc-chip-trailing-icon-size: 18px;
$mdc-chip-leading-icon-delay: -50ms; // Speed up delay to bridge gap between leading icon and checkmark transition.
$mdc-chip-checkmark-with-leading-icon-delay: 80ms;

$mdc-chip-checkmark-animation-delay: 50ms;
$mdc-chip-checkmark-animation-duration: 150ms;
Expand Down
4 changes: 4 additions & 0 deletions packages/mdc-chips/chip/mdc-chip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,14 @@

.mdc-chip__icon--leading {
transition: opacity $mdc-chip-opacity-animation-duration linear;
transition-delay: $mdc-chip-leading-icon-delay;
opacity: 1;

+ .mdc-chip__checkmark {
transition: opacity $mdc-chip-opacity-animation-duration linear;

// Delay the checkmark transition.
transition-delay: $mdc-chip-checkmark-with-leading-icon-delay;
opacity: 0;

.mdc-chip__checkmark-svg {
Expand Down

0 comments on commit 9e35b1e

Please sign in to comment.