Skip to content

Commit

Permalink
Merge pull request #122 from iantrich/fix-height
Browse files Browse the repository at this point in the history
Fix height in horizontal-stack & grid (useful for sections)
  • Loading branch information
ildar170975 authored Jan 12, 2025
2 parents cc56761 + 690f249 commit 0092729
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/restriction-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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);
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 0092729

Please sign in to comment.