From 018554cc473e320b3a6523733ed1bc553120538f Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Sun, 22 Feb 2026 17:10:11 -0800 Subject: [PATCH] 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 --- web/app/globals.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/app/globals.css b/web/app/globals.css index 92263fbf..a80da967 100644 --- a/web/app/globals.css +++ b/web/app/globals.css @@ -1,5 +1,7 @@ @import "tailwindcss"; +@custom-variant dark (&:where(.dark, .dark *)); + :root { --background: #fafafa; --foreground: #171717;