From 10cc3bdd3f5a664fdba319747119d030ae84fce0 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 25 Mar 2024 15:53:52 +0100 Subject: [PATCH] Fix header on take control dialog (#20123) --- src/components/ha-dialog.ts | 6 +-- .../card-editor/hui-dialog-edit-card.ts | 3 +- .../lovelace/editor/hui-dialog-save-config.ts | 43 +++++++++++++++---- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/components/ha-dialog.ts b/src/components/ha-dialog.ts index 9cf199dbe5..19401d826d 100644 --- a/src/components/ha-dialog.ts +++ b/src/components/ha-dialog.ts @@ -139,12 +139,12 @@ export class HaDialog extends DialogBase { } .header_button { position: absolute; - right: -8px; - top: -8px; + right: -12px; + top: -12px; text-decoration: none; color: inherit; inset-inline-start: initial; - inset-inline-end: -8px; + inset-inline-end: -12px; direction: var(--direction); } .dialog-actions { diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts index c27b7024a2..e437a81362 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts @@ -220,7 +220,6 @@ export class HuiDialogEditCard ? html` + + + ${heading} + - `} - > + +

${this.hass!.localize("ui.panel.lovelace.editor.save_config.para")} @@ -183,7 +196,19 @@ export class HuiSaveConfig extends LitElement implements HassDialog { } static get styles(): CSSResultGroup { - return [haStyleDialog]; + return [ + haStyleDialog, + css` + ha-dialog { + --dialog-content-padding: 0 24px 24px 24px; + } + + ha-dialog-header a { + color: inherit; + text-decoration: none; + } + `, + ]; } }