fix(ui): give the scroll shadow size variable a real default

The base rule declared --scroll-shadow-size as var(--scroll-shadow-size,
48px) — a self-referential cycle, which computes to invalid and silently
resolves every mask below to none. The old ScrollShadow component masked
the bug by setting the variable inline; the hook-based path (the chat
scroller) sets only the data attributes, so the chat lost its top and
bottom scroll fades. A concrete 48px default restores them; inline
overrides from the component still win.
This commit is contained in:
Bohdan Triapitsyn
2026-08-26 00:09:34 +03:00
parent 2d8571c6f2
commit 043e71d725
+6 -1
View File
@@ -258,7 +258,12 @@ div[data-chat-input-footer="true"] {
/* Scroll shadow (HeroUI) fallback styling to ensure visible gradients without the Tailwind plugin */
[data-scroll-shadow="true"] {
--scroll-shadow-size: var(--scroll-shadow-size, 48px);
/* A concrete default, not var(--scroll-shadow-size, 48px): a custom
property referencing itself is a cycle and computes to invalid, which
silently killed every mask below for consumers that don't set the
variable inline (the hook-based chat scroller). Inline styles from the
ScrollShadow component still override this. */
--scroll-shadow-size: 48px;
}
[data-scroll-shadow="true"][data-orientation="vertical"] {