CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(theme): force light mode on marketing routes #3891

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/audit-home-page-visibility-0e3dCmainopened Apr 26, 2026
ccantynzcommented Apr 26, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/MarcoReid.com/pull/52


You're right that I should have caught this during the audit. Marketing pages were designed for the light palette only — every text colour assumes a white / navy-50 section background. When dark mode is on, sections without an explicit bg-* inherit the body's navy-950 background, and navy-700 text becomes navy-700 on navy-950 — unreadable. The screenshot of the accounting "numbers speak for themselves" section was the obvious example; the same class of bug is on every marketing page that has a section without a forced background.

Two-part fix so there's no flash either:

  • Root layout inline theme script (runs before render) now checks the pathname. If it is NOT a platform route (/dashboard, /admin, /clients, /matters, /documents, /trust, /billing, /time, /voice, /news, /settings, /onboarding), it forces class="light" on immediately. Platform routes still respect the user's saved theme.
  • Marketing layout adds a small client component (ForceLightTheme) as belt-and-braces — strips dark / adds light on mount, restores on unmount so platform pages still go dark when the user navigates back into the app.

This lets us ship now without doing a full dark-variant pass on every marketing page. When we do that pass, we can drop the override.

ccantynzcommented Apr 26, 2026

Originally written by @vercel[bot] on GitHub.


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

Project Deployment Actions Updated (UTC)
marco-reid-com Ready Ready Preview, Comment Apr 26, 2026 6:37pm

Request Review

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts