PiotrMachowski / Home-Assistant-Lovelace-HTML-Jinja2-Template-card

This card displays provided Jinja2 template as an HTML content of a card. It uses exactly the same engine as Home Assistant in Developer tools.
MIT License
68 stars 10 forks source link

Card background is forced opaque despite semi-transparent card background in theme #3

Closed DarkFox closed 4 years ago

DarkFox commented 4 years ago

When using a theme with semi-transparent card backgrounds, the transparency doesn't work on html-template-card.

PiotrMachowski commented 4 years ago

I use semi-transparent cards and it works perfectly well, so the problem is probably in the theme itself. Could you show your theme config?

DarkFox commented 4 years ago

I dug around a bit more, and it seems to only happen when using it in combination with vertical-stack-in-card.

Vertical-stack-in-card is supposed to remove the sub-card's background and border, but it doesn't look like it does for this card.

PiotrMachowski commented 4 years ago

I will take a look, for now you can probably use picture_elements_mode

PiotrMachowski commented 4 years ago

Does is work in picture_elements_mode?

DarkFox commented 4 years ago

Sort of, but that also removes the margin/padding, so I'll just stick with this mod-card workaround for now.

  - type: custom:mod-card
    style: |
      #htmlCard {
        background: inherit;
        border: 0px;
      }
    card: ...
PiotrMachowski commented 4 years ago

Rendering issues have been fixed in version 1.0.2