This week's sponsor

Vectornator

Graphic Design for the iPad and iPhone – Reimagined!


Safari Technology Preview Allows Websites to Switch Themes Based on Mojave’s Dark Mode

With Mojave, Apple introduced a user-selectable Dark Mode. Although Dark Mode is implemented throughout Mojave and Apple’s system apps, it’s not automatic. Third-party developers have to update their apps to adopt the feature. Many developers have already added Dark Mode support, but when you run across one that hasn’t, it can be jarring.

Safari has a similar problem. Although the browser incorporates Mojave’s Dark Mode, which makes the app’s chrome dark, websites have no way to detect if a Mac is running in Light or Dark Mode. As a result, even if a site has light and dark themes like MacStories does, the theme has to be switched manually.

Safari Technology Preview 68 changes this by adding support for the prefers-color-scheme media query. Websites that implement the feature will be able to detect if a user’s system is set to Light or Dark Mode and apply a light or dark theme to match the user’s preference. Similar to apps, website owners still need to implement a dark theme for their sites, but if they do, the new feature will switch themes automatically.

Safari has a relatively small piece of the overall browser market, so broad adoption of dark themes is by no means an inevitability. However, I’m glad to see the feature coming to Safari soon because if you use Dark Mode on a Mac, bright white webpages clash with the rest of the UI.

Unlock MacStories Extras

Club MacStories offers exclusive access to extra MacStories content, delivered every week; it's also a way to support us directly.

Club MacStories will help you discover the best apps for your devices and get the most out of your iPhone, iPad, and Mac. Plus, it's made in Italy.

Starting at $5/month, with an annual option available. Join the Club.

A Club MacStories membership includes:

  • MacStories Weekly newsletter, delivered every week on Friday with app collections, tips, iOS workflows, and more;
  • Monthly Log newsletter, delivered once every month with behind-the-scenes stories, app notes, personal journals, and more;
  • Access to occasional giveaways, discounts, and free downloads.