Namegarage

Testing Safari Adaptive Dark Mode without trusting CSS colors

Dev blog#website#accessibility#safari#testing

A dark screenshot does not prove that Safari's Adaptive Dark Mode is running. Our site already has a dark theme. A screenshot of that theme could pass while the browser feature was off.

We needed a page that would change only when the browser adapted it. The control was a local page with a white background, black text, and no color-scheme declaration. In native Safari, we switched Adaptive Dark Mode Off and On through the Page Menu. The control changed from white to dark.

The browser keeps CSS queries unchanged

WebKit's announcement explains a limit on testing this feature: JavaScript color queries return the authored colors, even when Safari transforms what the user sees. Drawing an image into a canvas also preserves its original appearance.

So we used native window screenshots and Safari's visible setting. At the same blank point in the control, a screenshot sample changed from device RGB 255,255,255 with the feature Off to 41,41,41 with it On. These are captured screen pixels, not values from getComputedStyle().

The check ran on November 14, 2026:

Native Safari test environment
Component Version
Safari 27.3, build 22626.1.12.11.4
macOS 27.3, build 26C5035r
System appearance Dark
Native window sizes 1280 × 850 and 700 × 850 points

An earlier Technology Preview attempt left the control white. We kept native acceptance open then. The successful control in Safari 27.3 supplied the missing evidence.

Declare support before the first render

WebKit says that pages declaring support for both color schemes retain their own colors. The declaration belongs in the initial HTML or CSS, before any later interaction:

<meta name="color-scheme" content="dark light">

Our catalog and domain pages already had that declaration. Several separate HTML responses did not. They had authored dark styling, but lacked the signal that the browser uses to recognize it.

The first patch covered six responses. We then audited the remaining HTML renderers, including policy and agreement reading views. Retained original agreement files stayed unchanged because their bytes identify earlier acceptances; the generated reading pages carry current presentation metadata.

Check the explicit Light choice

With Adaptive Dark Mode On, we exercised Auto → Light → Dark → Auto on both the catalog and a domain page. Explicit Light stayed light. Dark kept the site's dark palette, and Auto followed the system's Dark appearance.

Native appearance checks by page type
Surface Native appearance check
Catalog and domain detail Theme interaction, fields, controls, and logo
Lease sign-in shell Text, input, button, and Namewrench mark
Checkout confirmation Purchase details, coupon field, and continue control
Offer response and changed hold terms Explanations, links, and controls
Email verification Code field and send control
Payment return and comment response Status text and return links

We reviewed those surfaces at both native window sizes. The transaction pages used local fixtures from the real renderers, with submissions and external services blocked. This was an appearance check, without a purchase, offer, email, or account submission.

We also checked the blog, podcast, policy and agreement readers, then opened the live catalog and agency agreement reader in native Safari. The original system appearance and Adaptive Dark Mode On setting were preserved.

This run covers macOS Safari. We did not test a native iOS runtime or collect a browser console and network audit. The reader announcement describes the result for people choosing a theme on the site.

Add as preferred source
Hacker News X LinkedIn Email

Using this button loads Google’s service and allows its usage measurement. Privacy policy.

Get new blog posts by email

Comments

Comments are reviewed before publication. The Author badge marks replies from the author.

Read approved comments on the discussion page.

    Open the discussion page

    Leave a comment

    Your account name, sign-in provider, and comment become public after review. Your email stays private. See the blog comments privacy notice and Privacy Policy.

    Sign in to leave a comment.