Fix initial scroll inside more info dialog (#15473)

This commit is contained in:
Paul Bottein 2023-02-16 12:54:17 +01:00 committed by GitHub
parent d5578c236f
commit 8631139133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,6 +273,7 @@ export class MoreInfoDialog extends LitElement {
--dialog-surface-position: static;
--dialog-content-position: static;
--vertical-align-dialog: flex-start;
--dialog-content-padding: 0;
}
ha-header-bar {
@ -297,8 +298,12 @@ export class MoreInfoDialog extends LitElement {
var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12));
}
:host([tab="settings"]) ha-dialog {
--dialog-content-padding: 0px;
ha-dialog .content {
padding: 24px;
}
:host([tab="settings"]) ha-dialog .content {
padding: 0px;
}
@media all and (min-width: 600px) and (min-height: 501px) {
@ -321,8 +326,8 @@ export class MoreInfoDialog extends LitElement {
}
}
:host([tab="info"]) ha-dialog[data-domain="camera"] {
--dialog-content-padding: 0;
:host([tab="info"]) ha-dialog[data-domain="camera"] .content {
padding: 0;
/* max height of the video is full screen, minus the height of the header of the dialog and the padding of the dialog (mdc-dialog-max-height: calc(100% - 72px)) */
--video-max-height: calc(100vh - 113px - 72px);
}