sinjins
sinjins

Reputation: 437

How to change color of paper-button's paper-material box shadow? (Polymer 1.0+)

Just wondering how I might go about changing the color of a paper-button's box shadow (button's toggles attribute enabled), in a dynamic fashion (i.e. based on a host element property value)? The 'shadow color' property isn't something that is currently exposed in it's api, and I'm not sure how one would even change the paper-button's child paper-material properties in such a way.

Upvotes: 1

Views: 677

Answers (1)

Kevin Ashcraft
Kevin Ashcraft

Reputation: 581

The shadow for paper-button comes from a paper-material inside.

To style the shadow of paper-material you can use these mixins (different depending on elevation):

  • --shadow-elevation-2dp
  • --shadow-elevation-3dp
  • --shadow-elevation-4dp
  • --shadow-elevation-6dp
  • --shadow-elevation-8dp

Here's a working example

Upvotes: 1

Related Questions