Our site serves a light-mode reader the same 38 pages, and the one preference that does repaint it turns 1,091 links yellow
Notifio is a desktop app that watches rental listing searches from your own machine and emails you when something new appears. The website in front of it is dark, the app is dark, and the alert email is dark. None of tha
Notifio is a desktop app that watches rental listing searches from your own machine and emails you when something new appears. The website in front of it is dark, the app is dark, and the alert email is dark. None of that is a toggle, a preference or a cookie. It is a decision made once and typed in three places.
I already counted the colours in the email templates, where the finding was the two meta tags that are missing. This post is the other two surfaces: the 38 public pages and the four windows the desktop app opens. The question is narrow and answerable. If a reader's operating system says light, does anything we serve change?
The instrument
The repo already carries Playwright for other reasons, so the sweep is 40 lines: three browser contexts at colorScheme: "dark", "light" and "no-preference", the 38 URLs out of our sitemap, and for each load a screenshot hash plus the computed styles that would have to move if a theme existed.
for (const scheme of ["dark", "light", "no-preference"]) {
const ctx = await browser.newContext({ colorScheme: scheme, viewport: { width: 1280, height: 900 } });
const page = await ctx.newPage();
for (const url of URLS) {
await page.goto(url, { waitUntil: "load" });
const shot = await page.screenshot();
// sha256 of the bytes, plus getComputedStyle on html, body and the first input
}
}
114 page loads. Here is everything the three passes disagreed about:
| Measurement | dark | light | no-preference |
|---|---|---|---|
html { color-scheme } |
dark | dark | dark |
body background |
rgb(10, 10, 10) |
rgb(10, 10, 10) |
rgb(10, 10, 10) |
body colour |
rgb(250, 250, 250) |
rgb(250, 250, 250) |
rgb(250, 250, 250) |
| Email field on /pricing |
#0a0a0a on a #2a2a2a border |
same | same |
| Identical screenshots | 37 of 38 | 37 of 38 | 37 of 38 |
The 38th page is the home page, and it is not a theme difference. The home page runs four animated mockups that never stop moving, so three loads in the same context produce three different hashes. Once you know that, the honest score is 38 of 38 unmoved, with one page that cannot be screenshot-compared at all.
Why the field in the form is already dark
The interesting half of that table is the email input on the pricing page. We never style its background. A reader whose system is set to light still gets a dark field with a light caret, and that is not luck, it is one line in globals.css:
html {
color-scheme: dark;
scroll-behavior: smooth;
background-color: #0a0a0a;
overscroll-behavior-y: none;
}
color-scheme: dark is the declaration that tells the user agent which palette to draw its own widgets from. Without it, our page would be dark and the parts the browser paints, the text caret, the autofill highlight, the selection colour, the default scrollbar, would be drawn from the reader's system preference instead. That is the classic dark-site bug: a white autofill block in the middle of a black form. We do not have it, because of one line nobody has touched since it was written.
So the site is not ignoring the preference. It is answering it, once, with "dark, always".
The census of what is not there
I pulled the one stylesheet the site serves and counted:
Stylesheet 39,976 bytes, one file
@media rules 5
(hover: hover) 2
(min-width: 40rem/48rem/64rem) 3
prefers-color-scheme 0
forced-colors 0
light-dark() 0
color-scheme declarations 1
And in the HTML of all 38 pages:
dark: utility classes 0
<meta name="color-scheme"> 0
<meta name="theme-color"> 0
Zero dark: classes is worth a second look, because this is a Tailwind v4 build. The framework's entire dark-mode feature ships with the toolchain, costs nothing to use, and appears in our output not once. That is the correct outcome for a single-theme site, and it is also the kind of zero that only shows up if you go and count it.
The two missing meta tags are a real, if small, gap. color-scheme in CSS covers the page. It does not cover the chrome drawn around the page, which is what theme-color is for: the address bar tint on Android, the title bar on some desktop browsers. We paint a #0a0a0a page into a toolbar whose colour we never nominate.
The same shape of gap exists in the favicon, which I wrote about when one 8.8KB bell turned out to have five jobs: we ship icon-light.svg and icon-dark.svg, a matched pair, and declare only the first, with no media attribute on the link. Both files still answer 200 today, 550 and 552 bytes. Nothing references the second one. Months later that is still true, which tells you something about how often a favicon gets looked at.
The app has four windows and one of them is white on purpose
The desktop side is a 3,181-line renderer and a main process that opens four BrowserWindows. nativeTheme, Electron's hook into the operating system's theme, appears zero times in the codebase. The colour decisions are literals:
| Window | backgroundColor |
What it shows |
|---|---|---|
| Main window | #0a0a0a |
Our own UI |
| Login window | #ffffff |
Somebody else's page |
| Recorder window | #ffffff |
Somebody else's page |
| Startup failure window | not set | A data URL painted #0a0a0a
|
The two white ones are white deliberately. A window that renders a third party's page should not pre-tint it, because a dark frame around a light page flashes at exactly the moment the reader is being asked to trust the window.
The fourth row is a small bug with a very small blast radius. The window we open when the app fails to start has no backgroundColor, so it defaults to white and then loads a dark data URL into itself. The one window a user sees when things have already gone wrong flashes white first. Cost of fixing: one property. It has survived because the only people who see it are people who already have a worse problem.
The renderer's own answer is the same single line as the website:
/* app/src/renderer/index.css, line 18 */
color-scheme: dark;
One line per surface, 39 distinct hex values in the app, and no media query about colour anywhere in either codebase.
The preference that does change everything
There is one system setting that repaints us, and it is the one we never wrote a line for. Windows high contrast, exposed to CSS as forced-colors: active, replaces the author's colours with a small system palette. I ran the same 38 pages with it on:
Pages whose screenshot changed 38 of 38
body background rgb(10,10,10) -> rgb(0,0,0)
body colour rgb(250,250,250) -> rgb(255,255,255)
Anchor colour, all 1,091 of them rgb(250,250,250) -> rgb(255,255,0)
Borders 355 white, 87 yellow
body::before gradients dropped entirely
Every single one of the 1,091 anchors on the site computes to the same yellow. That is the feature working: the reader asked for maximum contrast and got it, including on the footer links that normally sit at 2.53:1.
The gap is what forced colours does not touch. Our pages carry 157 inline SVGs holding 166 stroked elements between them, and those strokes are set as presentation attributes rather than as colours the forced-colours engine rewrites. Across the 38 pages, under forced colours:
119 strokes still #525252
20 strokes still #4ade80
13 strokes still #6a6a6a
So a reader in high contrast mode gets white text, yellow links and the same mid-grey icons they had before, now on pure black instead of near black. The text got better and the drawings did not. The fix is a @media (forced-colors: active) block that maps those strokes to CanvasText, which is one rule we do not have, and now the only colour rule I know we are missing.
Takeaways
- A permanently dark site should still say so in CSS.
color-scheme: darkis what keeps the browser's own widgets, caret and autofill from being drawn out of the reader's palette instead of yours. -
color-schemein CSS and<meta name="theme-color">are not the same promise. One covers the page, the other covers the furniture around it. - Emulating the preference and hashing screenshots is a five-minute way to prove a claim like "we have one theme". Counting declarations proves the intent, screenshots prove the result.
- When a page animates on its own, screenshot comparison stops being a usable oracle. Load the same page twice in one context before you trust a diff across two.
-
forced-colorsis the one colour preference that will change your pages whether you support it or not, and it will not touch SVG presentation attributes. That is where a single-theme site quietly keeps its low-contrast pixels.
If you want to see the single theme, it is on every page: the alerts catalogue, the pricing page with the one form field in this post, the help page, and the download page for the app whose four windows are counted above.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.