From 70f40104e9414dcfd8f6936c054291a009713d62 Mon Sep 17 00:00:00 2001 From: piitaya Date: Thu, 21 Apr 2022 19:19:31 +0200 Subject: [PATCH] fix(alarm): fix alarm panel display for some layouts --- .../alarm-control-panel-card/alarm-control-panel-card.ts | 3 +++ src/shared/card.ts | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cards/alarm-control-panel-card/alarm-control-panel-card.ts b/src/cards/alarm-control-panel-card/alarm-control-panel-card.ts index 6bd522496..3de1ac291 100644 --- a/src/cards/alarm-control-panel-card/alarm-control-panel-card.ts +++ b/src/cards/alarm-control-panel-card/alarm-control-panel-card.ts @@ -293,6 +293,9 @@ export class AlarmControlPanelCard extends LitElement implements LovelaceCard { height: 100%; box-sizing: border-box; padding: var(--spacing); + display: flex; + flex-direction: column; + justify-content: center; } mushroom-state-item { cursor: pointer; diff --git a/src/shared/card.ts b/src/shared/card.ts index 05257220b..3c452467a 100644 --- a/src/shared/card.ts +++ b/src/shared/card.ts @@ -35,12 +35,15 @@ export class Card extends LitElement { height: 100%; box-sizing: border-box; padding: var(--spacing); + display: flex; + flex-direction: column; + justify-content: center; } .container { display: flex; flex-direction: column; - width: 100%; - height: 100%; + flex-shrink: 0; + flex-grow: 0; box-sizing: border-box; justify-content: center; }