Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(ripple): Transition background-color to avoid flashes #3693

Merged
merged 2 commits into from
Oct 2, 2018
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
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