xRay
xRay

Reputation: 801

Background color for matRipple

If I use <span matRipple matRippleColor="red">Text</span>, everything becomes red and I can't read my text anymore.

Stackblitz

Is there a way to make only the background red but not the text?

Upvotes: 0

Views: 353

Answers (1)

AlleXyS
AlleXyS

Reputation: 2598

You need to use position absolute and z-index: 1 for text value

<span matRipple matRippleColor="red">
  <span style="position:absolute; z-index:1">Text</span>
</span>

Upvotes: 1

Related Questions