Skip to content
52 changes: 26 additions & 26 deletions src/components/ha-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,11 @@ class HaSidebar extends LitElement {
</mwc-icon-button>
`
: ""}
<div class="title">
${this.editMode
? html`<mwc-button outlined @click=${this._closeEditMode}>
${this.hass.localize("ui.sidebar.done")}
</mwc-button>`
: "Home Assistant"}
</div>
${this.editMode
? html`<mwc-button outlined @click=${this._closeEditMode}>
${this.hass.localize("ui.sidebar.done")}
</mwc-button>`
: html`<div class="title">Home Assistant</div>`}
</div>`;
}

Expand Down Expand Up @@ -756,7 +754,7 @@ class HaSidebar extends LitElement {
-moz-user-select: none;
border-right: 1px solid var(--divider-color);
background-color: var(--sidebar-background-color);
width: 64px;
width: 56px;
}
:host([expanded]) {
width: 256px;
Expand All @@ -768,8 +766,9 @@ class HaSidebar extends LitElement {
}
.menu {
height: var(--header-height);
box-sizing: border-box;
display: flex;
padding: 0 8.5px;
padding: 0 4px;
border-bottom: 1px solid transparent;
white-space: nowrap;
font-weight: 400;
Expand All @@ -778,11 +777,11 @@ class HaSidebar extends LitElement {
background-color: var(--primary-background-color);
font-size: 20px;
align-items: center;
padding-left: calc(8.5px + env(safe-area-inset-left));
padding-left: calc(4px + env(safe-area-inset-left));
}
:host([rtl]) .menu {
padding-left: 8.5px;
padding-right: calc(8.5px + env(safe-area-inset-right));
padding-left: 4px;
padding-right: calc(4px + env(safe-area-inset-right));
}
:host([expanded]) .menu {
width: calc(256px + env(safe-area-inset-left));
Expand All @@ -793,26 +792,27 @@ class HaSidebar extends LitElement {
.menu mwc-icon-button {
color: var(--sidebar-icon-color);
}
:host([expanded]) .menu mwc-icon-button {
margin-right: 23px;
}
:host([expanded][rtl]) .menu mwc-icon-button {
margin-right: 0px;
margin-left: 23px;
}

.title {
margin-left: 19px;
width: 100%;
display: none;
}
:host([rtl]) .title {
margin-left: 0;
margin-right: 19px;
}
:host([narrow]) .title {
margin: 0;
padding: 0 16px;
}
:host([expanded]) .title {
display: initial;
}
.title mwc-button {
width: 90%;
:host([expanded]) .menu mwc-button {
margin: 0 8px;
}
.menu mwc-button {
width: 100%;
}
#sortable,
.hidden-panel {
Expand Down Expand Up @@ -850,14 +850,14 @@ class HaSidebar extends LitElement {

paper-icon-item {
box-sizing: border-box;
margin: 4px 8px;
margin: 4px;
padding-left: 12px;
border-radius: 4px;
--paper-item-min-height: 40px;
width: 48px;
}
:host([expanded]) paper-icon-item {
width: 240px;
width: 248px;
}
:host([rtl]) paper-icon-item {
padding-left: auto;
Expand All @@ -874,9 +874,9 @@ class HaSidebar extends LitElement {
border-radius: 4px;
position: absolute;
top: 0;
right: 0;
right: 2px;
bottom: 0;
left: 0;
left: 2px;
pointer-events: none;
content: "";
transition: opacity 15ms linear;
Expand Down
3 changes: 1 addition & 2 deletions src/components/ha-tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ export class HaTab extends LitElement {
text-align: center;
align-items: center;
justify-content: center;
height: 64px;
height: var(--header-height);
cursor: pointer;
position: relative;
outline: none;
box-sizing: border-box;
}

.name {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ha-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export class HaTabs extends PaperTabs {

superStyle!.appendChild(
document.createTextNode(`
:host {
padding-top: .5px;
#selectionBar {
box-sizing: border-box;
}
.not-visible {
display: none;
Expand Down
4 changes: 2 additions & 2 deletions src/dialogs/notifications/notification-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class HuiNotificationDrawer extends EventsMixin(
color: var(--primary-text-color);
border-bottom: 1px solid var(--divider-color);
background-color: var(--primary-background-color);
min-height: 64px;
width: calc(100% - 32px);
height: var(--header-height);
box-sizing: border-box;
}

div[main-title] {
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/hass-error-screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class HassErrorScreen extends LitElement {
display: flex;
align-items: center;
font-size: 20px;
height: 65px;
height: var(--header-height);
padding: 0 16px;
pointer-events: none;
background-color: var(--app-header-background-color);
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/hass-loading-screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class HassLoadingScreen extends LitElement {
display: flex;
align-items: center;
font-size: 20px;
height: 65px;
height: var(--header-height);
padding: 0 16px;
pointer-events: none;
background-color: var(--app-header-background-color);
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/hass-subpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class HassSubpage extends LitElement {
display: flex;
align-items: center;
font-size: 20px;
height: 65px;
height: var(--header-height);
padding: 0 16px;
pointer-events: none;
background-color: var(--app-header-background-color);
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/hass-tabs-subpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class HassTabsSubpage extends LitElement {
display: flex;
align-items: center;
font-size: 20px;
height: 65px;
height: var(--header-height);
background-color: var(--sidebar-background-color);
font-weight: 400;
color: var(--sidebar-text-color);
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/home-assistant-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class HomeAssistantMain extends LitElement {
color: var(--primary-text-color);
/* remove the grey tap highlights in iOS on the fullscreen touch targets */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
--app-drawer-width: 64px;
--app-drawer-width: 56px;
}
:host([expanded]) {
--app-drawer-width: calc(256px + env(safe-area-inset-left));
Expand Down
12 changes: 11 additions & 1 deletion src/resources/ha-sortable-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,25 @@ export const sortableStyles = css`
display: none;
position: absolute;
top: 0;
right: 0;
right: 4px;
--mdc-icon-button-size: 40px;
}

:host([rtl]) .show-panel {
right: initial;
left: 4px;
}

.hide-panel {
top: 4px;
right: 8px;
}

:host([rtl]) .hide-panel {
right: initial;
left: 8px;
}

:host([expanded]) .hide-panel {
display: block;
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/ha-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ documentContainer.innerHTML = `<custom-style>
--secondary-background-color: #e5e5e5; /* behind the cards on state */

/* for header */
--header-height: 64px;
--header-height: 56px;

/* for label-badge */
--label-badge-red: #DF4C1E;
Expand Down