thomasloven / lovelace-state-switch

🔹Dynamically replace lovelace cards depending on occasion
MIT License
382 stars 27 forks source link

Any chance for "height: 100%" (with card_mod)? #96

Open StephanSchuster opened 1 year ago

StephanSchuster commented 1 year ago

Is there any chance to make the div#root inside <state-switch> 100% in height?

image

Background: I have two cards side by side (entities + picture-elements) and they should have the same height. Without the state-switch card, this is automatically the case. But as soon as I wrap my entities card in a state-switch, the 100% height (usually in ha-card) gets lost.

Probably card_mod is the way to go and I should ask the question there. But I thought maybe there is also a chance for an additional "styles" option etc. in state-switch. Furthermore card_mod and state-switch share the same author. ;-)

In card_mod I read DOM navigation and Styling cards without . After various tries I gave up without success. Either it is not possible or I am missing something.

Currently I use an ugly hack with transition_time: '0ms; height: 100%;' which results in

image

and works. But is obviously not good.

JimmyGiant commented 1 year ago

@StephanSchuster @thomasloven I've got the exact same problem. This also happens, when you are using conditional cards. Have been trying for hours to get this to work. Did you find a solution for this?

And also how did you manage to manipulate the transition-delay of the #root? I tried to select it via card-mod or custom css-file. Nothing worked for me.

Thanks!