Fix header when sidebar always hidden (#15980)

This commit is contained in:
Bram Kragten 2023-03-30 16:46:31 +02:00 committed by GitHub
parent e6772e8b89
commit 5193f2c6a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -142,10 +142,12 @@ export class HomeAssistantMain extends LitElement {
protected updated(changedProps: PropertyValues) {
super.updated(changedProps);
toggleAttribute(this, "expanded", this.hass.dockedSidebar === "docked");
toggleAttribute(
this,
"expanded",
this.narrow || this.hass.dockedSidebar !== "auto"
"modal",
this._sidebarNarrow || this._externalSidebar
);
}
@ -165,20 +167,20 @@ export class HomeAssistantMain extends LitElement {
/* remove the grey tap highlights in iOS on the fullscreen touch targets */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
--mdc-drawer-width: 56px;
--mdc-top-app-bar-width: calc(100% - var(--mdc-drawer-width));
}
:host([expanded]) {
--mdc-drawer-width: calc(256px + env(safe-area-inset-left));
}
:host([modal]) {
--mdc-drawer-width: unset;
--mdc-top-app-bar-width: unset;
}
partial-panel-resolver,
ha-sidebar {
/* allow a light tap highlight on the actual interface elements */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}
@media (min-width: 870px) {
partial-panel-resolver {
--mdc-top-app-bar-width: calc(100% - var(--mdc-drawer-width));
}
}
`;
}
}