Step 1 — Reinstall next-themes
Step 2 — Wrap with ThemeProvider
Edit src/components/providers.tsx:
theme="light" prop from <Toaster> — sonner will
follow the system theme automatically through next-themes.
Step 3 — Re-add .dark block in globals.css
Add the variant directive at the top of src/app/globals.css (right
after the @plugin line):
.dark { ... } block right after :root { ... } defining the
inverse palette. For the editorial cream-mono baseline, that means
something like:
Step 4 — Restore the toggle component
Recreatesrc/components/layout/theme-toggle.tsx:
src/components/layout/header.tsx:
Step 5 — Restore dark: Tailwind variants where they matter
The places in Vibestrap that used dark-variant compensations were:
- Markdown prose pages — add
dark:prose-invertback to the<div className="prose ...">wrappers undersrc/app/[locale]/(marketing)/{terms,privacy,refund,license,about,changelog,blog/[slug]}/page.tsx. - Status colors in
src/components/ai/*—text-emerald-600etc. benefit fromdark:text-emerald-400for readable contrast on dark. src/components/ui/alert.tsx— destructive variant readability.src/components/turnstile-field.tsx— passresolvedThemeto the Turnstile widget so its embedded UI matches.
dark:* usages you need with:
dark:* class alongside.
Verification
After the five steps, run the gates:- Marketing pages render cleanly in both themes.
- Status / accent colors are readable in dark.
- Sonner toasts pick up the active theme.
- Turnstile widget colors match.