diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 4f86c9f202..9cfffb822c 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -43,6 +43,7 @@ import { getExternalConfig, } from "../external_app/external_config"; import { actionHandler } from "../panels/lovelace/common/directives/action-handler-directive"; +import { haStyleScrollbar } from "../resources/styles"; import type { HomeAssistant, PanelInfo } from "../types"; import "./ha-icon"; import "./ha-menu-button"; @@ -249,6 +250,7 @@ class HaSidebar extends LitElement { * { - box-sizing: border-box; - } + .uni-virtualizer-host > * { + box-sizing: border-box; + } - .narrow .entry { - flex-direction: column; - line-height: 1.5; - padding: 8px; - } + .narrow .entry { + flex-direction: column; + line-height: 1.5; + padding: 8px; + } - .narrow .icon-message ha-icon { - margin-left: 0; - } - `; + .narrow .icon-message ha-icon { + margin-left: 0; + } + `, + ]; } } diff --git a/src/resources/styles.ts b/src/resources/styles.ts index 8054abe475..ef04c15548 100644 --- a/src/resources/styles.ts +++ b/src/resources/styles.ts @@ -320,3 +320,22 @@ export const haStyleDialog = css` color: var(--error-color); } `; + +export const haStyleScrollbar = css` + .ha-scrollbar::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + } + + .ha-scrollbar::-webkit-scrollbar-thumb { + -webkit-border-radius: 4px; + border-radius: 4px; + background: var(--scrollbar-thumb-color); + } + + .ha-scrollbar { + overflow-y: auto; + scrollbar-color: var(--scrollbar-thumb-color) transparent; + scrollbar-width: thin; + } +`;