diff --git a/src/restriction-card.ts b/src/restriction-card.ts index 6a65fe5..f4b2a46 100644 --- a/src/restriction-card.ts +++ b/src/restriction-card.ts @@ -266,7 +266,7 @@ class RestrictionCard extends LitElement implements LovelaceCard { static get styles(): CSSResult { return css` :host { - display: block; + display: inline; position: relative; --regular-lock-color: var(--restriction-regular-lock-color, var(--primary-text-color, #212121)); --success-lock-color: var(--restriction-success-lock-color, var(--primary-color, #03a9f4)); @@ -278,6 +278,9 @@ class RestrictionCard extends LitElement implements LovelaceCard { --lock-icon-size: var(--restriction-lock-icon-size, var(--mdc-icon-size, 24px)); --lock-opacity: var(--restriction-lock-opacity, 0.5); } + div:has(#card) { + height: 100%; + } ha-icon { --mdc-icon-size: var(--lock-icon-size); } @@ -293,6 +296,9 @@ class RestrictionCard extends LitElement implements LovelaceCard { display: flex; color: var(--regular-lock-color); } + #card { + height: 100%; + } #overlay:not(:has(.hidden)) + #card.card-row { overflow-y: clip; }