Skip to content

fix(ui): restrain dark-mode pills (chip wash + lower pill bg opacity)#61

Merged
ringo380 merged 1 commit into
mainfrom
fix/dark-mode-restrain-pills
May 14, 2026
Merged

fix(ui): restrain dark-mode pills (chip wash + lower pill bg opacity)#61
ringo380 merged 1 commit into
mainfrom
fix/dark-mode-restrain-pills

Conversation

@ringo380
Copy link
Copy Markdown
Owner

Why

User feedback on PR #60: the "warm cream" selected chip was still a near-white block (95% luminance vs ~4% page), and the emerald credits pill was still glowing at 22% saturation. Both read as bright UI alerts in an otherwise muted dark palette — wrong for the aesthetic regardless of the hex codes.

Two scoped changes

1. Selected DB chip → indigo wash

html.dark [role="radio"][aria-checked="true"] {
  background-color: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.4);
}

Affordance now comes from brand indigo wash + inset border, not luminance contrast. Still visually distinct from the #17181c unselected chips.

2. Grade/status pill backgrounds: halve opacity

Color Before After
emerald rgba(16,185,129,0.22) rgba(16,185,129,0.10)
lime rgba(132,204,22,0.22) rgba(132,204,22,0.10)
amber rgba(217,119,6,0.25) rgba(217,119,6,0.12)
orange rgba(234,88,12,0.28) rgba(234,88,12,0.14)
red rgba(239,68,68,0.28) rgba(239,68,68,0.14)

Text colors preserved (lime bumped to #a3e635 to compensate for the dimmer bg). Pills now read as ambient indicators with colored text floating on near-OLED, not saturated chips.

Verification

  • collectstatic → 169 / 799 ✅
  • Same compound selectors as the existing grade-pill rules; specificity (0,2,1) beats single-class fallbacks.
  • Selected chip has higher-specificity selector (0,3,1) than html.dark .dark\:bg-white (0,2,1) so the override still wins.

Test plan

  • DB chip group: the active chip is a subtle indigo wash, not a bright block
  • Credits pill (50/50 credits / 50 of 50 free grades remaining…) reads as ambient info, not a glowing alert
  • Grade A pill on /account/ and /history/ is restrained but distinct from grade B/C/D/F

User feedback after PR #60: the "warm cream" selected chip was still a
near-white block, and the emerald credits pill was still glowing at 22%
saturation. Both read as bright UI alerts in an otherwise muted dark
palette — wrong for the dark-mode aesthetic regardless of the hex codes
under them.

Selected DB chip: replace cream-on-black with an indigo wash. Background
`rgba(99,102,241,0.18)`, text `#c7d2fe` (indigo-200), inset 1px indigo
border via box-shadow so the affordance comes from brand color rather
than brute-force luminance contrast. Still visually distinct from the
unselected `#17181c` slate chips; quiet against the `#0a0a0a` page.

Grade/status pill backgrounds: halve opacity (22-28% → 10-16%) across
emerald / lime / amber / orange / red. Text colors mostly preserved
(lime gets bumped to #a3e635 for the lower-opacity bg). Pills now read
as ambient indicators with colored text floating on near-black, not as
glowing chips. Same selector as before — applies to the credits pill in
the navbar and the grade pill on results/account/history pages.
@ringo380 ringo380 merged commit 4bc816f into main May 14, 2026
@ringo380 ringo380 deleted the fix/dark-mode-restrain-pills branch May 14, 2026 04:28
ringo380 added a commit that referenced this pull request May 14, 2026
PR #61 dimmed the grade-pill compound rule but only matched the
bg-{color}-100.text-{color}-700 combination. The anon trial banner
("50 of 50 free grades remaining this session") in index.html uses
bg-emerald-50.text-emerald-700 — different class combo, slipped past
the rule and continued rendering at light-mode saturation.

Extend each color's compound rule to cover the -50 variant too
(emerald, lime, amber, orange, red). Add emerald-50.text-emerald-900
since query_with_context.html uses that pair.

Now matches the ambient-pill treatment everywhere those classes appear:
trial banner, grade-A surfaces in compare_results / contextualized
results, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant