fix(mobile): restore the scroll-row trailing fade dropped by the CSS compiler#498
Merged
Merged
Conversation
…compiler The horizontal fade on .answer-suggestion-row-scroll (prescribing checks, differentials recent work, etc.) vanished on phones: the source declared an unconditional mask-image plus a min-width:640px reset to none, but Lightning CSS collapsed the base rule — whose only media override was the mask — and dropped the gradient from the compiled output entirely. The near-identical .answer-suggestion-chips-scroll survived only because its override also changes other properties, so the compiler kept the rules distinct. Scope the fade to a single max-width:639px block instead, leaving no base rule for the compiler to merge away. Behavior is unchanged: gradient below 640px, none from sm up. Restores the two ui-tools "Responsive layout guards" mobile scroll-row tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013mCpzKWTCtBSLC6p1NsSWo
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Contributor
📝 WalkthroughWalkthroughThe search suggestion scroll row’s gradient mask is now applied only at viewport widths below 640px. The previous mask-disabling override near the breakpoint has been removed. ChangesMobile suggestion fade
Estimated code review effort: 1 (Trivial) | ~5 minutes Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (10 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
BigSimmo
marked this pull request as ready for review
July 11, 2026 14:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.answer-suggestion-row-scroll(the mobile scroll rows used by the prescribing "Medication checks" shortcuts, differentials "Recent work", etc.) had disappeared. The sourceglobals.cssdeclared an unconditionalmask-imagegradient plus a@media (min-width: 640px) { mask-image: none }reset — but Lightning CSS (Tailwind v4's compiler) collapsed the base rule, since its only media override was the mask, and dropped the gradient from the compiled output entirely. The near-identical.answer-suggestion-chips-scrollsurvived only because itsmin-width:640pxoverride also changes other properties, so the compiler kept those two rules distinct.@media (max-width: 639px)block instead of the unconditional-base + desktop-reset pair. There's no base rule left for the compiler to merge away, so the declaration survives. Behavior is identical in intent — gradient below 640px,nonefromsmup.This was not introduced by PR #473 (which only touched the 5 composer TSX files); it surfaced from later home-layout CSS work in
globals.css.Verification
npx playwright test tests/ui-tools.spec.ts -g "prescribing mobile shortcuts and checks are distinct|differentials recent work remains touch-sized" --project=chromium --repeat-each=2: passed (4/4). (Both were consistently failing onmainbeforehand: 4/4 failed.)npx playwright test tests/ui-tools.spec.ts --project=chromium: passed (44/44) — no regressions.npm run lint: passed.git diff --check: passed (clean, no whitespace/conflict markers).getComputedStyle(row).maskImage===linear-gradient(90deg, rgb(0,0,0) calc(100% - 16px), rgba(0,0,0,0))(present); at 768px ===none— passed (behavior preserved at both breakpoints).npm run verify:release— reason: out of scope for a single decorative-CSS-rule fix; the relevant Chromium UI suite (ui-tools) was run directly and passed.Clinical Governance Preflight
Not applicable: this is a single CSS
mask-imagescoping change to a decorative scroll-row fade. It does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.Notes
.answer-suggestion-chips-scroll). A comment inglobals.cssrecords why the mask is scoped this way so it isn't "simplified" back into the dropped form.🤖 Generated with Claude Code
https://claude.ai/code/session_013mCpzKWTCtBSLC6p1NsSWo