From cb215252cd42d02c04c8b7635e858a60ec2ddae1 Mon Sep 17 00:00:00 2001 From: Jack <72348727+Jack-GitHub12@users.noreply.github.com> Date: Wed, 1 Jul 2026 10:50:37 -0500 Subject: [PATCH 1/2] fix(react): keep native select options readable in dark mode The native ` dropdown options readable in dark mode. The console themes through `prefers-color-scheme` and never sets a `.dark` class, so Tailwind `dark:` utilities never matched and the native option popup rendered with a light color scheme over dark text. `NativeSelect` now uses a solid themed surface (`bg-popover`) and pins `color-scheme` to the active theme, so the browser draws a matching, readable popup. diff --git a/packages/react/src/components/native-select.tsx b/packages/react/src/components/native-select.tsx index 6b970cdef..5cb2fab13 100644 --- a/packages/react/src/components/native-select.tsx +++ b/packages/react/src/components/native-select.tsx @@ -1,24 +1,32 @@ import * as React from "react"; import { ChevronDownIcon } from "lucide-react"; +import { useIsDark } from "../hooks/use-is-dark"; import { cn } from "../lib/utils"; function NativeSelect({ className, size = "default", + style, ...props }: Omit, "size"> & { size?: "sm" | "default" }) { + const isDark = useIsDark(); return (
+ {/* The native option popup follows the select's opaque background and + color-scheme, not option-level styles. Give it a solid themed surface + and pin color-scheme so options stay readable in dark mode, which is + driven by prefers-color-scheme (no .dark class in this app). */} {/* oxlint-disable-next-line react/forbid-elements */}