Fix more info position (#15650)

This commit is contained in:
Bram Kragten 2023-03-01 14:42:42 +01:00 committed by GitHub
parent 34c15d96c1
commit d32cde3cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -428,10 +428,12 @@ export class MoreInfoDialog 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;
/* This is needed for the tooltip of the history charts to be positioned correctly */
--dialog-surface-position: static;
--dialog-content-position: static;
--vertical-align-dialog: flex-start;
--dialog-content-padding: 0;
}
@ -469,11 +471,17 @@ export class MoreInfoDialog extends LitElement {
text-overflow: ellipsis;
}
@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;
}
}
@media all and (min-width: 600px) and (min-height: 501px) {
ha-dialog {
--mdc-dialog-min-width: 560px;
--mdc-dialog-max-width: 580px;
--dialog-surface-margin-top: 40px;
--mdc-dialog-max-height: calc(100% - 72px);
}