From 737484dfd94e184a6d430c812f8d30fb46c42ed6 Mon Sep 17 00:00:00 2001 From: Adam Kapos Date: Sun, 28 Apr 2024 21:48:35 +0300 Subject: [PATCH 1/3] Fix visual differences between regular and energy dashboards --- src/panels/energy/ha-panel-energy.ts | 4 +--- src/panels/lovelace/hui-root.ts | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/panels/energy/ha-panel-energy.ts b/src/panels/energy/ha-panel-energy.ts index c033f7c2f3d6..74a1f783b009 100644 --- a/src/panels/energy/ha-panel-energy.ts +++ b/src/panels/energy/ha-panel-energy.ts @@ -402,11 +402,9 @@ class PanelEnergy extends LitElement { box-sizing: border-box; padding-left: env(safe-area-inset-left); padding-inline-start: env(safe-area-inset-left); - padding-right: env(safe-area-inset-right); padding-inline-end: env(safe-area-inset-right); + padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); - } - hui-view { background: var( --lovelace-background, var(--primary-background-color) diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 6226897809a3..e95cdf1861dd 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -1013,8 +1013,6 @@ class HUIRoot extends LitElement { padding-inline-start: env(safe-area-inset-left); padding-inline-end: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); - } - hui-view { background: var( --lovelace-background, var(--primary-background-color) From 8fef80d885ef51a7f1f63a1f727a5ee2d8d8ef0e Mon Sep 17 00:00:00 2001 From: Adam Kapos Date: Sun, 28 Apr 2024 22:16:42 +0300 Subject: [PATCH 2/3] Order padding properties the same way between energy and lovelace --- src/panels/energy/ha-panel-energy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/energy/ha-panel-energy.ts b/src/panels/energy/ha-panel-energy.ts index 74a1f783b009..86ce3ea95340 100644 --- a/src/panels/energy/ha-panel-energy.ts +++ b/src/panels/energy/ha-panel-energy.ts @@ -401,9 +401,9 @@ class PanelEnergy extends LitElement { min-height: 100vh; box-sizing: border-box; padding-left: env(safe-area-inset-left); + padding-right: env(safe-area-inset-right); padding-inline-start: env(safe-area-inset-left); padding-inline-end: env(safe-area-inset-right); - padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); background: var( --lovelace-background, From 347482abf950bb98588263e762be2d25512b35d5 Mon Sep 17 00:00:00 2001 From: Adam Kapos Date: Tue, 30 Apr 2024 12:23:19 +0000 Subject: [PATCH 3/3] Change from code review --- src/panels/energy/ha-panel-energy.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/panels/energy/ha-panel-energy.ts b/src/panels/energy/ha-panel-energy.ts index 86ce3ea95340..328e25cf4cd5 100644 --- a/src/panels/energy/ha-panel-energy.ts +++ b/src/panels/energy/ha-panel-energy.ts @@ -112,14 +112,14 @@ class PanelEnergy extends LitElement { - +
+ +
`; }