Skip to content

fix(dark-mode): white-on-white text on highlighted/active items - #123

Merged
holkexyz merged 1 commit into
feat/positioning-redesignfrom
fix/dark-mode-white-on-white
Jun 2, 2026
Merged

fix(dark-mode): white-on-white text on highlighted/active items#123
holkexyz merged 1 commit into
feat/positioning-redesignfrom
fix/dark-mode-white-on-white

Conversation

@hb-agent

@hb-agent hb-agent commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

What

In dark mode, several highlighted ("active") items showed white text on a near-white fill — unreadable. Fixed all of them.

Root cause (two flavours)

A. background: var(--fg-primary) + fixed-white text. --fg-primary flips to near-white (#f5f5f7) in dark mode, so a fixed white text became white-on-white. The white was sometimes literal (#ffffff) and sometimes hidden behind an undefined token: var(--bg-primary, #fff)--bg-primary isn't defined in tokens.css, so it silently resolves to #fff. Fixed by using var(--bg-canvas), which inverts with the fill (matching the existing correct .onboarding-modal__step--current).

  • .explore__filter--active, .explore__view-btn--active
  • .sx-menu__item--active (+ its icon)
  • 5 active items in the workspace page

B. Fixed near-white image-overlay pill + var(--fg-primary) text. The "ghost" avatar/banner edit buttons have a fixed rgba(255,255,255,.92) surface, but their text used --fg-primary (near-white in dark mode). Fixed by using the invariant var(--color-primary) since the surface itself is invariant.

  • .image-edit-overlay__btn--ghost
  • .profile-banner-upload__btn--ghost

12 declarations across 5 CSS files. No raw hex added (a couple of #ffffff/#fff literals removed in favour of tokens).

Verification

  • next build compiles
  • Dark-mode computed styles (injected each fixed element, data-theme="dark"): now near-black text (rgb(24,24,27) / rgb(17,17,17)) on its light fill (rgb(245,245,247) / near-white). Was white-on-white before.

Related finding (not fixed here)

The same undefined tokens are also used as backgrounds in a few places: background: var(--bg-primary, var(--bg-base, #fff)) (both undefined → white surface) in context-updates.css:134, cert-detail.css:2011/2086. Those would render white surfaces in dark mode (a different symptom than the white-text-on-highlight reported here). Happy to fix as a follow-up — it needs a small judgment call (define the tokens vs. swap each to --bg-elevated).

🤖 Generated with Claude Code

…items

Several highlighted ("active") items rendered white text on a near-white
fill in dark mode. Two root causes, both fixed by using theme-aware tokens:

1. background: var(--fg-primary) + a FIXED white text (#ffffff, or
   var(--bg-primary, #fff) where --bg-primary is an undefined token that
   silently resolves to #fff). --fg-primary flips to near-white in dark
   mode, so the fill and the text were both light. Fixed: text uses
   var(--bg-canvas), which inverts with the fill (light in light mode,
   dark in dark mode), matching the existing .onboarding-modal__step--current.
   - .explore__filter--active, .explore__view-btn--active (explore.css)
   - .sx-menu__item--active + its icon (settings-page.css)
   - workspace active items x5 (workspace.css)

2. background: rgba(255,255,255,.92) (a fixed near-white image-overlay pill)
   + color: var(--fg-primary), which flips near-white in dark mode. Fixed:
   text uses the invariant var(--color-primary) since the surface is invariant.
   - .image-edit-overlay__btn--ghost (components.css)
   - .profile-banner-upload__btn--ghost (profile-inline-edit.css)

Verified via computed styles in dark mode: each is now near-black text on
its light fill. Build compiles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
certified-app Ready Ready Preview, Comment Jun 2, 2026 1:37pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9c43d0a7-c2c1-4bf8-88db-8b5f755059f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dark-mode-white-on-white

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@holkexyz
holkexyz marked this pull request as ready for review June 2, 2026 13:47

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@holkexyz
holkexyz merged commit de88414 into feat/positioning-redesign Jun 2, 2026
3 checks passed
@holkexyz
holkexyz deleted the fix/dark-mode-white-on-white branch June 2, 2026 13:47
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.

2 participants