From 9f243f569fa9cc7fca8b93d481dff5afd9d7c14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Mon, 31 Aug 2026 02:38:59 +0100 Subject: [PATCH] native controls follow the theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing set `color-scheme`, so the browser drew every control it renders itself as if the page were light. On a dark theme a `'s dropdown opened as a white sheet with the page's own + pale text on it. Unreadable, and unreachable by any utility class, because that list is painted by + the browser and is not in the document. + + `color-scheme` is the only thing that reaches it. It also fixes, for free, the other controls with + no styleable interior: date and colour pickers, the spinner on a number input, and default + scrollbars where a theme has not replaced them. + + ── Why the `dark` class decides it ── + + It is the signal that exists. 203 of the 231 themes set `applyDarkClass`, and the provider puts the + class on beside `data-theme`, so the two are always in agreement about the same element. + Both are specificity 0-1-0 and themes are imported after this file, so a theme that disagrees can + simply say so — this is a default, not a decision taken away. + + ── And the explicit colours underneath ── + + `color-scheme` gives the browser's generic dark, not the theme's. Where a browser honours colours on + `