1

I have a custom-styles file that defines html and body like this:

<style is="custom-style">
html, body { color: #ffffff; background-color: #212121; }
</style>

The problem I have is that those styles are leaking to custom elements in their local dom, making the font color white.

This should not be happening according to the documentation here: https://www.polymer-project.org/1.0/docs/devguide/styling.html#custom-style

My question is: Is this the default behavior or is this a bug?

Thanks

Guillermo
  • 136
  • 2
  • 5

1 Answers1

1

I'm pretty sure this is not related to custom-style but to body. You'd need to change the color and background-color of your elements to something else than inherit which is the default.

See also CSS to prevent child element from inheriting parent styles

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567