Skip to content

Lift dark surfaces on Send, Delegate and Vote - #283

Merged
github-actions[bot] merged 1 commit into
mainfrom
agent/unify-dark-surface-contrast
Sep 4, 2026
Merged

Lift dark surfaces on Send, Delegate and Vote#283
github-actions[bot] merged 1 commit into
mainfrom
agent/unify-dark-surface-contrast

Conversation

@Fuma419

@Fuma419 Fuma419 commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Round 1 of the "everything is so dark on dark" cleanup, awaiting visual review before merge.

What was wrong

These pages stacked translucent black on a near-black (#080808) page, so elevation ran backwards: a card sitting on a panel was darker than the panel, and each panel's gradient faded to 0.015 alpha at the bottom, dissolving into the page. Nothing had an edge, so the whole screen read as one dark smear.

Changes (shared tokens, so all three pages move together)

Area Before After
Nested cards / inputs (insetBg) rgba(0,0,0,0.35) — darker than parent white overlay — rises above parent
Panel edge none (soft shadow only) hairline inset ring, both color modes
Panel fill 0.07 → 0.015 alpha, faded out near-flat 0.09 → 0.07
panelBorder transparent in both modes hairline
Fields fill only, no rim modest fill + visible rim
Secondary text / placeholders whiteAlpha.600 / .500 whiteAlpha.700 / .600
Disabled CTA whiteAlpha.200 under whiteAlpha.500 shared disabledBg / disabledFg

The ring is drawn as inset 0 0 0 1px rather than a real border so panels that declare border: none don't reflow by 1px, and the nested cards already reserved a 1px transparent border, so they gained edges at zero layout cost.

Unification: Governance shipped a solid cyan primary while Send and Delegate used brand yellow, so the same commit action looked like a different control per page. It now matches. Cyan stays on badges and outline buttons as the section accent.

Measured on the Send page screenshot

Sampled from the Jenkins main screenshot vs this branch, same coordinates:

  • Panel edge luminance 19 → 69
  • Panel interior top-to-bottom 18 → 13 (faded away) becomes 27 → 25 (holds)
  • Disabled "Review transaction" label contrast 3.26:1 → 6.96:1 (was below AA, now passes)
  • Section labels such as "TO" 132 → 172

Verification

  • NODE_ENV=test npx jest — 920 passed
  • npm run lint — 0 errors
  • Playwright screenshots for Send / staking / governance regenerated and inspected

New src/test/unit/ui/dark-surface-contrast.test.js locks the contract: no black overlays for elevated surfaces, hairline panel edges, a readable disabled pairing, and one shared primary button. governance-page.test.js previously pinned panelBorder to transparent; updated in the same commit since that was the contract being fixed.

Note: e2e/screenshots.spec.js spec 08 fails on this host, but it fails identically on clean main locally and passes in CI, so it is local node_modules drift rather than a regression from this change.

These pages stacked translucent black on a near-black page, so nested
cards and inputs sank into their parent instead of rising above it and
every panel faded into the background toward its bottom edge.

Elevation now goes lighter, not darker:

- insetBg/cardBg become white overlays so status cards read as raised.
- Panels carry a hairline edge (inset ring, so no 1px reflow) and a
  nearly flat fill instead of a gradient that faded out at 0.015 alpha.
  Measured on the Send page: panel edge luminance 19 -> 69, and panel
  interior holds 27 -> 25 top to bottom where it used to drop 18 -> 13.
- panelBorder is a hairline in both modes rather than transparent.
- Fields keep a modest fill and lean on a visible rim, so an input reads
  as an input whether it sits on a panel or inside a nested card.
- Secondary text and placeholders move off the dim floor.

Disabled CTAs were the worst offender: whiteAlpha.200 fill under
whiteAlpha.500 text measured 3.26:1, so "Review transaction" was
effectively invisible. Shared disabledBg/disabledFg tokens take it to
6.96:1 on the same screenshot.

Governance also shipped a solid cyan primary while Send and Delegate
used brand yellow, so the same commit action looked like a different
control per page; it now matches. Cyan stays on badges and outline
buttons as the section accent.
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
lucem-wallet Ignored Ignored Sep 4, 2026 7:36pm UTC

Request Review

@github-actions
github-actions Bot enabled auto-merge (squash) September 4, 2026 19:36
@github-actions
github-actions Bot merged commit 2dc0217 into main Sep 4, 2026
10 checks passed
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