Fix safe area inset in sidebar (#25074)

This commit is contained in:
Bram Kragten 2025-04-15 15:32:57 +02:00 committed by GitHub
parent 91a5497c60
commit d5a6e16bf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -253,8 +253,10 @@ class HaSidebar extends SubscribeMixin(LitElement) {
${this._renderHeader()} ${this._renderHeader()}
${this._renderAllPanels(selectedPanel)} ${this._renderAllPanels(selectedPanel)}
${this._renderDivider()} ${this._renderDivider()}
${this._renderNotifications()} <ha-md-list>
${this._renderUserItem(selectedPanel)} ${this._renderNotifications()}
${this._renderUserItem(selectedPanel)}
</ha-md-list>
<div disabled class="bottom-spacer"></div> <div disabled class="bottom-spacer"></div>
<div class="tooltip"></div> <div class="tooltip"></div>
`; `;
@ -900,6 +902,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
} }
:host([expanded]) ha-md-list-item { :host([expanded]) ha-md-list-item {
width: 248px; width: 248px;
width: calc(248px - env(safe-area-inset-left));
} }
ha-md-list-item.selected { ha-md-list-item.selected {
@ -923,6 +926,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
ha-icon[slot="start"], ha-icon[slot="start"],
ha-svg-icon[slot="start"] { ha-svg-icon[slot="start"] {
width: 24px;
flex-shrink: 0; flex-shrink: 0;
color: var(--sidebar-icon-color); color: var(--sidebar-icon-color);
} }