← Back to release summary

Honor media HTML attribute for meta name=theme-color

Category
DOM
Type
Chromium catches up
Status
Enabled by default (Chrome 93)
Intent stage
Shipped

Summary

The meta element’s “media” attribute will be honored for meta[name="theme-color"] so that web developers can adjust the theme color of their site based on a media query (dark and light modes for instance). The first one that matches will be picked.

Standards & signals

Docs: https://web.dev/add-manifest/#theme-color

Samples: https://media-meta-theme-color.glitch.me/

Explainers: https://github.com/whatwg/html/issues/6495 https://photos.app.goo.gl/kmhABhbVqVzneKxN6

View on chromestatus.com