From dc7ba0dac693dfa71cc850bbe68bd644783a898d Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 9 Jul 2025 10:02:12 +0200 Subject: [PATCH] Fix dialog at the top --- src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts b/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts index 34cb63ded4..e0a3661eb6 100644 --- a/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts +++ b/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts @@ -178,8 +178,17 @@ class HuiGroupToggleDialog extends LitElement { haStyleDialog, css` ha-dialog { + /* Set the top top of the dialog to a fixed position, so it doesnt jump when the content changes size */ + --vertical-align-dialog: flex-start; + --dialog-surface-margin-top: 40px; --dialog-content-padding: 0; } + @media all and (max-width: 450px), all and (max-height: 500px) { + /* When in fullscreen dialog should be attached to top */ + ha-dialog { + --dialog-surface-margin-top: 0px; + } + } .content { padding: 0 16px 16px 16px; display: flex;