WIP β fix(skins): Liquid light contrast pass (Mood Radio + About + scan)#278
WIP β fix(skins): Liquid light contrast pass (Mood Radio + About + scan)#278InstaZDLL wants to merge 2 commits into
Conversation
Two related regressions reported on the Liquid light skin after v1.5.0: 1. **Mood Radio cards still pale** β the previous fix (#275) bumped the `::before` opacity from 0.55 to 0.95, but the gradient itself uses `rgb(X Y Z / 0.55)` per stop, and the two alphas multiply (0.55 Γ 0.95 = 0.52, basically the original). Bump the gradient internal alphas to 1.0 in light mode so the 5 cards become saturated colored surfaces that the hardcoded white text actually reads on. Dark mode keeps the original translucent gradients β the dark page makes them pop on its own. 2. **About hero invisible** β `AboutView` ships the hero with `<div className="... bg-linear-to-br from-zinc-900 ... text-white">`. The dark gradient body is the design intent (white text on dark block, Studio works perfectly). In Liquid light the surrounding aurora bleeds through and inherited `text-white` propagates down to every text child β invisible. Remap `.text-white` to `--liq-ink` in light mode, excluding elements that ALSO carry a saturated colored bg (emerald pills, mood tiles, etc.) where the white is intentional. The exclusion chain matches the colors already used by intentional-white components across the app. Both ship under `:not(.dark)` so dark Liquid stays unchanged.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the βοΈ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Comment |
β¦iquid light) User reports the Mood Radio tiles flicker β sometimes saturated as designed, sometimes pale-white again. Investigation pointed at the ::before pseudo route being fragile against three runtime races: 1. **Theme/skin re-application on profile load** β ThemeContext reads the active profile's DB row on mount + on every profile switch (ThemeContext.tsx:111), which calls applyTheme() and toggles the `.dark` class. During the gap between cached-theme apply and DB-theme apply, `:not(.dark)` can stop matching and the ::before-based rule falls back to the 0.55-alpha gradient. 2. **View transitions on theme toggle** β setThemeId triggers `document.startViewTransition` which snapshots the paint for ~300ms. If the snapshot caught a state where my rule wasn't matching, the tile stays pale until the transition tears down. 3. **240ms opacity transition on ::before** β the pseudo has a transition: opacity, so even when the rule matches again the tiles fade back in slowly, giving a "blinks white" impression. Fix: paint the saturated gradient directly on the tile element (background-image, !important) instead of via the pseudo, and display: none the ::before in light mode so the two layers don't double-stack. Element-level paint isn't subject to z-index/stacking gymnastics, isn't affected by the transition on the pseudo, and survives the .dark flips during profile load. Dark mode keeps the existing ::before route unchanged β there it works because the dark page makes the translucent gradient pop on its own.
|
Closing β the ::before/:not(.dark) approach has runtime races (theme/skin re-application on profile load, view-transition snapshots, opacity transition flicker). Starting over with a cleaner approach when we have bandwidth. |
Symptoms (Liquid light skin, after v1.5.0 ship)
First-pass attempt (cherry-picked from debc42f)
Why this isn't enough yet
User-tested in the live app and reported:
Next iterations to try
Test plan