diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts index b7646edebe..5b17615e01 100644 --- a/src/dialogs/more-info/ha-more-info-dialog.ts +++ b/src/dialogs/more-info/ha-more-info-dialog.ts @@ -766,7 +766,10 @@ export class MoreInfoDialog extends ScrollableFadeMixin(LitElement) { } .content-wrapper.settings-view .fade-bottom { - bottom: var(--ha-space-18); + bottom: calc( + var(--ha-space-14) + + max(var(--safe-area-inset-bottom), var(--ha-space-4)) + ); } .child-view { diff --git a/src/mixins/scrollable-fade-mixin.ts b/src/mixins/scrollable-fade-mixin.ts index a70cd7eaa9..722bfd40e9 100644 --- a/src/mixins/scrollable-fade-mixin.ts +++ b/src/mixins/scrollable-fade-mixin.ts @@ -50,7 +50,7 @@ export const ScrollableFadeMixin = >( /** * Safe area padding in pixels for the scrollable element. */ - protected scrollFadeSafeAreaPadding = 16; + protected scrollFadeSafeAreaPadding = 4; /** * Scroll threshold in pixels for showing the fades. @@ -73,6 +73,9 @@ export const ScrollableFadeMixin = >( protected firstUpdated(changedProperties: PropertyValues) { super.firstUpdated?.(changedProperties); + if (this.scrollableElement) { + this._updateScrollableState(this.scrollableElement); + } this._attachScrollableElement(); } @@ -83,6 +86,8 @@ export const ScrollableFadeMixin = >( disconnectedCallback() { this._detachScrollableElement(); + this._contentScrolled = false; + this._contentScrollable = false; super.disconnectedCallback(); } @@ -125,16 +130,16 @@ export const ScrollableFadeMixin = >( position: absolute; left: 0; right: 0; - height: var(--ha-space-4); + height: var(--ha-space-2); pointer-events: none; transition: opacity 180ms ease-in-out; - background: linear-gradient( - to bottom, - var(--shadow-color), - transparent - ); border-radius: var(--ha-border-radius-square); opacity: 0; + background: linear-gradient( + to bottom, + var(--ha-color-shadow-scrollable-fade), + transparent + ); } .fade-top { top: 0; diff --git a/src/resources/theme/color/semantic.globals.ts b/src/resources/theme/color/semantic.globals.ts index e0fa043be7..392c5e28cc 100644 --- a/src/resources/theme/color/semantic.globals.ts +++ b/src/resources/theme/color/semantic.globals.ts @@ -156,6 +156,9 @@ export const semanticColorStyles = css` /* Surfaces */ --ha-color-surface-default: var(--ha-color-neutral-95); --ha-color-on-surface-default: var(--ha-color-neutral-05); + + /* Scrollable fade */ + --ha-color-shadow-scrollable-fade: rgba(0, 0, 0, 0.08); } `;