Fix theme toggle using system preference instead of selected theme (#326)

Tailwind v4 defaults dark: utilities to @media (prefers-color-scheme)
strategy. Add @custom-variant to use class-based dark mode matching
the next-themes ThemeProvider attribute="class" configuration.

Fixes https://github.com/manaflow-ai/cmux/issues/325
This commit is contained in:
Lawrence Chen 2026-02-22 17:10:11 -08:00 committed by GitHub
parent 1bc3edf75f
commit 018554cc47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,7 @@
@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));
:root {
--background: #fafafa;
--foreground: #171717;