Fix dialog at the top

This commit is contained in:
Paul Bottein 2025-07-09 10:02:12 +02:00
parent 2ab4608884
commit dc7ba0dac6
No known key found for this signature in database

View File

@ -178,8 +178,17 @@ class HuiGroupToggleDialog extends LitElement {
haStyleDialog, haStyleDialog,
css` css`
ha-dialog { 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; --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 { .content {
padding: 0 16px 16px 16px; padding: 0 16px 16px 16px;
display: flex; display: flex;