Skip to content

Commit

Permalink
fix(ripple): Transition background-color to avoid flashes (material-c…
Browse files Browse the repository at this point in the history
…omponents#3693)

(cherry picked from commit cbc1f95)
  • Loading branch information
kfranqueiro authored and acdvorak committed Oct 8, 2018
1 parent 974c2d5 commit 17a5828
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/mdc-ripple/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
}

&::before {
transition: opacity $mdc-states-wash-duration linear;
// Also transition background-color to avoid unnatural color flashes when toggling activated/selected state
transition:
opacity $mdc-states-wash-duration linear,
background-color $mdc-states-wash-duration linear;
z-index: 1; // Ensure that the ripple wash for hover/focus states is displayed on top of positioned child elements
}

Expand Down

0 comments on commit 17a5828

Please sign in to comment.