Child Controls Loses Ripple Effect if [backgroundColor] property is set for mat-tab-group, is there any workaround.?
Asked
Active
Viewed 124 times
1 Answers
2
The ripple effect is working but we are not able to see it as the ripple color
is white. It is taking white color because you have set backgroundColor to primary and your primary color is blue which has foreground white. The ripple automatically takes this foreground color.
You can solve it by two methods
By providing color to
matRippleColor
attribute if yourbackgroundColor
set to dark color, in your case its primary and warn.<div class="div-style mat-elevation-z4" matRipple matRippleColor="rgba(0,0,0,.1)>Ripple</div>
By setting light
backgroundColor
. In your case itsaccent
.

Vikash Dahiya
- 5,741
- 3
- 17
- 24
-
thanks... also could u please tell me how to get the current theme (dark/light)'s ripple color.. I'm using **mixin** and **scss** for component styles... and set it to the matRippleColor. – Pradeep Jan 14 '19 at 18:31