Make conditional not take up space in stacks when hidden (#1999)

* Make conditional not take up space in stacks when hidden

* Update hui-conditional-card.ts
This commit is contained in:
Thomas Lovén 2018-11-06 12:39:00 +01:00 committed by Paulus Schoutsen
parent e1c90d74e3
commit 849d7d2d95

View File

@ -67,6 +67,8 @@ class HuiConditionalCard extends HTMLElement implements LovelaceCard {
} else if (this._card.parentElement) { } else if (this._card.parentElement) {
this.removeChild(this._card); this.removeChild(this._card);
} }
// This will hide the complete card so it won't get styled by parent
this.style.setProperty("display", visible ? "" : "none");
} }
public getCardSize() { public getCardSize() {