Fix alert padding inside more info dialog (#15477)

This commit is contained in:
Paul Bottein 2023-02-20 14:30:38 +01:00 committed by GitHub
parent c4160e8368
commit e91a477b8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View File

@ -274,6 +274,7 @@ export class MoreInfoDialog extends LitElement {
--dialog-content-position: static; --dialog-content-position: static;
--vertical-align-dialog: flex-start; --vertical-align-dialog: flex-start;
--dialog-content-padding: 0; --dialog-content-padding: 0;
--content-padding: 24px;
} }
ha-header-bar { ha-header-bar {
@ -299,11 +300,17 @@ export class MoreInfoDialog extends LitElement {
} }
ha-dialog .content { ha-dialog .content {
padding: 24px; padding: var(--content-padding);
} }
:host([tab="settings"]) ha-dialog .content { :host([tab="settings"]) ha-dialog {
padding: 0px; --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);
} }
@media all and (min-width: 600px) and (min-height: 501px) { @media all and (min-width: 600px) and (min-height: 501px) {
@ -325,12 +332,6 @@ export class MoreInfoDialog extends LitElement {
--mdc-dialog-max-width: 90vw; --mdc-dialog-max-width: 90vw;
} }
} }
: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);
}
`, `,
]; ];
} }

View File

@ -99,9 +99,9 @@ export class MoreInfoInfo extends LitElement {
ha-alert { ha-alert {
display: block; display: block;
margin: calc(-1 * var(--dialog-content-padding, 24px)) margin: calc(-1 * var(--content-padding, 24px))
calc(-1 * var(--dialog-content-padding, 24px)) 16px calc(-1 * var(--content-padding, 24px)) 16px
calc(-1 * var(--dialog-content-padding, 24px)); calc(-1 * var(--content-padding, 24px));
} }
`; `;
} }