Don't make dialog boxes fullscreen on mobile (#12928)

This commit is contained in:
Bram Kragten 2022-06-14 20:04:09 +02:00 committed by GitHub
parent 6a3a0db338
commit 5160a1f55c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,6 @@ import "../../components/ha-dialog";
import "../../components/ha-svg-icon"; import "../../components/ha-svg-icon";
import "../../components/ha-switch"; import "../../components/ha-switch";
import { HaTextField } from "../../components/ha-textfield"; import { HaTextField } from "../../components/ha-textfield";
import { haStyleDialog } from "../../resources/styles";
import { HomeAssistant } from "../../types"; import { HomeAssistant } from "../../types";
import { DialogBoxParams } from "./show-dialog-box"; import { DialogBoxParams } from "./show-dialog-box";
@ -135,34 +134,34 @@ class DialogBox extends LitElement {
} }
static get styles(): CSSResultGroup { static get styles(): CSSResultGroup {
return [ return css`
haStyleDialog, :host([inert]) {
css` pointer-events: initial !important;
:host([inert]) { cursor: initial !important;
pointer-events: initial !important; }
cursor: initial !important; a {
} color: var(--primary-color);
a { }
color: var(--primary-color); p {
} margin: 0;
p { padding-top: 6px;
margin: 0; padding-bottom: 24px;
padding-top: 6px; color: var(--primary-text-color);
padding-bottom: 24px; }
color: var(--primary-text-color); .no-bottom-padding {
} padding-bottom: 0;
.no-bottom-padding { }
padding-bottom: 0; .secondary {
} color: var(--secondary-text-color);
.secondary { }
color: var(--secondary-text-color); ha-dialog {
} --mdc-dialog-heading-ink-color: var(--primary-text-color);
ha-dialog { --mdc-dialog-content-ink-color: var(--primary-text-color);
/* Place above other dialogs */ --justify-action-buttons: space-between;
--dialog-z-index: 104; /* Place above other dialogs */
} --dialog-z-index: 104;
`, }
]; `;
} }
} }