Fixes Color not being overwritten by themes for cards#2179
Conversation
| border-radius: 2px; | ||
| transition: all 0.3s ease-out; | ||
| background-color: var(--paper-card-background-color, white); | ||
| color: var(--primary-text-color); |
There was a problem hiding this comment.
Making a change like this to a web component that we use throughout the whole Home Assistant and Hass.io UI seems a little wild. Do we really know that we're not messing with anything here?
There was a problem hiding this comment.
So the color css was set back on panel element and therefore taking the value of primary text color back at that Dom. This just allows it to be changed in the card Dom. If the variable is not overwritten itshould still assume the primary text color set at panel element
There was a problem hiding this comment.
You do realize that this is not a Lovelace specific element?
There was a problem hiding this comment.
Sure. But the logic is still the same. The variable will trickle down and only if overwritten will it be changed. Currently it does not work as expected because color is set so high in the Dom tree
This allows card themes to overwrite the color using
--primary-text-color