mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix header when sidebar always hidden (#15980)
This commit is contained in:
parent
e6772e8b89
commit
5193f2c6a4
@ -142,10 +142,12 @@ export class HomeAssistantMain extends LitElement {
|
|||||||
protected updated(changedProps: PropertyValues) {
|
protected updated(changedProps: PropertyValues) {
|
||||||
super.updated(changedProps);
|
super.updated(changedProps);
|
||||||
|
|
||||||
|
toggleAttribute(this, "expanded", this.hass.dockedSidebar === "docked");
|
||||||
|
|
||||||
toggleAttribute(
|
toggleAttribute(
|
||||||
this,
|
this,
|
||||||
"expanded",
|
"modal",
|
||||||
this.narrow || this.hass.dockedSidebar !== "auto"
|
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 */
|
/* remove the grey tap highlights in iOS on the fullscreen touch targets */
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
--mdc-drawer-width: 56px;
|
--mdc-drawer-width: 56px;
|
||||||
|
--mdc-top-app-bar-width: calc(100% - var(--mdc-drawer-width));
|
||||||
}
|
}
|
||||||
:host([expanded]) {
|
:host([expanded]) {
|
||||||
--mdc-drawer-width: calc(256px + env(safe-area-inset-left));
|
--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,
|
partial-panel-resolver,
|
||||||
ha-sidebar {
|
ha-sidebar {
|
||||||
/* allow a light tap highlight on the actual interface elements */
|
/* allow a light tap highlight on the actual interface elements */
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
-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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user