Re: [csswg-drafts] [mediaqueries] Effect of <meta name=color-scheme> on the (prefers-color-scheme) MQ (#10249)

I googled out this exact page - while not reading carefully and still learning to understand the color-scheme related topics i prepared a rule that forces the meta tag to style as you want. While only the red color was tested i expect the color-scheme to work also. Please take a look that the following  css rule that enforce at least chromium based browser and FF the color-scheme placed in the meta tag:

head:has(meta[name="color-scheme"][content="dark"]) + body {background:#f00 !important;color-scheme:dark}  

content might be a regular expression [content*="dark"], etc

Caution - :has() capable browsers are required chrome 105(pretty old), ff 121 (12.2023?) - FF global market share is almost marginal.

-- 
GitHub Notification of comment by brilliapps
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10249#issuecomment-3533037974 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 14 November 2025 14:23:32 UTC