Introducing Adaptive Dark Mode
Safari 27.3 beta adds Adaptive Dark Mode, which automatically darkens light websites that don't declare dark mode support via color-scheme. Inside WebKit, a luminosity-inverting color matrix preserves hue, text contrast targets WCAG 4.5:1, SVGs are recolored, simple black-and-white bitmap logos are detected via pixel histograms, and canvas, masks and mix-blend-mode are left alone or disabled. Sites can opt out with `color-scheme: light only`, improve results by using SVG, CSS colors and transparent images, or ship a custom dark mode using color-scheme, prefers-color-scheme and light-dark(). Websites cannot detect the transformation, because JavaScript sees the original authored colors, which avoids adding a fingerprinting signal.
Related posts
- How The New York Times Games Team Delivered Accessible, Cross-Platform Dark Mode
NYT Open mediumAdeptThe New York Times Games app shipped dark mode across Android, iOS and hybrid webviews by moving from hard-coded colors to semantic design tokens (e.g. "Background Primary" became "$bg-page") through a legacy-to-new color mapping. Android handled XML and Jetpack Compose screens separately. On iOS, UIKit screens needed overrideUserInterfaceStyle and traitCollectionDidChange observers, while SwiftUI screens used @Environment(\.colorScheme) with asset catalogs. Shared NYT packages such as login and avatar selection had to be updated in coordination with the app. Illustrations were reworked by hand rather than color-inverted, and a standalone badge-detail webview takes a "dark" query parameter so it follows the app's global setting.
- Dark mode was never on our roadmap. Here’s how it got built.
Medium Engineering mediumAdeptMedium shipped dark mode for its reader experience with essentially one engineer working between other projects, guided by three guardrails: keep it safe, keep it small, keep it concrete. Work-in-progress CSS sat behind a Statsig feature flag that temporarily split the Cloudflare Workers edge cache. The flash of incorrect theme was avoided by converting hard-coded hex color tokens to CSS variables using light-dark() and color-scheme, which lets the browser pick the theme before first paint without caching a light and a dark copy of every page. Claude audited the codebase for hard-coded and legacy colors and turned the findings into small Linear tickets, while manual QA and designers handled the judgment calls.
- News from WWDC24: WebKit in Safari 18 beta
WebKit mediumAdeptSafari 18 beta ships 48 new web platform features, 18 deprecations and 174 bug fixes across iOS 18, iPadOS 18, visionOS 2 and macOS Sequoia betas. Headline additions include immersive WebXR on visionOS with transient-pointer input and hand tracking, the View Transitions API, CSS Style Queries for custom properties, and currentcolor and system color keywords in Relative Color Syntax. Further additions are display-property transitions, the safe alignment keyword in Flexbox, content-visibility, and unprefixed backdrop-filter. Mac web apps can now open matching links based on their manifest scope and support extensions, and the Fullscreen API on visionOS can present spatial photos and panoramas immersively.
- Customizing Color Fonts on the Web
WebKit mediumAdeptWebKit (Safari 15.4+) supports the CSS `@font-palette-values` at-rule, which lets authors select a color font's predefined CPAL palettes by index and override individual palette colors, then apply them with the `font-palette` property. Browsers without support fall back to palette 0, which can be guarded with `@supports`. `font-palette: light`/`dark` pick palettes the font marks for light or dark backgrounds and pair naturally with `prefers-color-scheme`. Because palette rules are scoped per font family, one palette name can map to different palettes across fallback fonts. Foreground-color shapes in some fonts follow the `color` property instead, and authors should keep palette contrast high for legibility.
- The golden rule of Customizable Select
WebKit mediumAdeptCustomizable select, arriving in Safari 27, lets developers fully style `<select>` elements with custom arrows, icons and swatches while keeping native keyboard navigation and accessibility semantics. The one essential rule is to always give each `<option>` text content or an accessible text attribute. Icon-only options are harder for everyone to scan, unusable with screen readers and braille displays, and render as empty options in browsers without support or when CSS fails to load. Use visually hidden text or `alt` attributes where needed, mark decorative images with `alt=""`, and wrap enhancements in `@supports (appearance: base-select)` so plain text stays the baseline.