Skip to content

Commit

Permalink
Fix visual differences between regular and energy dashboards (#20654)
Browse files Browse the repository at this point in the history
* Fix visual differences between regular and energy dashboards

* Order padding properties the same way between energy and lovelace

* Change from code review
  • Loading branch information
Nezz authored Apr 30, 2024
1 parent bcb72d8 commit 334c245
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
20 changes: 9 additions & 11 deletions src/panels/energy/ha-panel-energy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ class PanelEnergy extends LitElement {
</hui-energy-period-selector>
</div>
</div>
<hui-view
id="view"
.hass=${this.hass}
.narrow=${this.narrow}
.lovelace=${this._lovelace}
.index=${this._viewIndex}
@reload-energy-panel=${this._reloadView}
></hui-view>
<div id="view" @reload-energy-panel=${this._reloadView}>
<hui-view
.hass=${this.hass}
.narrow=${this.narrow}
.lovelace=${this._lovelace}
.index=${this._viewIndex}
></hui-view>
</div>
`;
}

Expand Down Expand Up @@ -401,12 +401,10 @@ class PanelEnergy extends LitElement {
min-height: 100vh;
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-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)
Expand Down
2 changes: 0 additions & 2 deletions src/panels/lovelace/hui-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 334c245

Please sign in to comment.