From 09683863a72aa3bf638a2ba8f9fb5016be8a9579 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 25 Sep 2025 10:41:05 +0200 Subject: [PATCH] Fix safe padding for bottom sheet and add scroll lock (#27165) --- src/components/ha-bottom-sheet.ts | 6 +++--- src/resources/theme/wa.globals.ts | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/ha-bottom-sheet.ts b/src/components/ha-bottom-sheet.ts index 49c71e3c59..9f9b5f8a4e 100644 --- a/src/components/ha-bottom-sheet.ts +++ b/src/components/ha-bottom-sheet.ts @@ -54,9 +54,9 @@ export class HaBottomSheet extends LitElement { border-top-left-radius: var(--ha-border-radius-lg); border-top-right-radius: var(--ha-border-radius-lg); max-height: 90vh; - margin-bottom: var(--safe-area-inset-bottom); - margin-left: var(--safe-area-inset-left); - margin-right: var(--safe-area-inset-right); + padding-bottom: var(--safe-area-inset-bottom); + padding-left: var(--safe-area-inset-left); + padding-right: var(--safe-area-inset-right); } `; } diff --git a/src/resources/theme/wa.globals.ts b/src/resources/theme/wa.globals.ts index a831f42d38..dd05b4e554 100644 --- a/src/resources/theme/wa.globals.ts +++ b/src/resources/theme/wa.globals.ts @@ -1,3 +1,4 @@ +import scrollLockStyles from "@home-assistant/webawesome/dist/styles/utilities/scroll-lock.css.js"; import { css } from "lit"; import { extractDerivedVars } from "../../common/style/derived-css-vars"; @@ -18,6 +19,8 @@ export const waMainStyles = css` --wa-border-width-l: var(--ha-border-radius-l); --wa-space-xl: 32px; } + + ${scrollLockStyles} `; export const waMainDerivedVariables = extractDerivedVars(waMainStyles);