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

@nt1m I think the use case is implementing a custom dark mode toggle more easily. Initially, you specify `<meta name="color-scheme" content="light dark">` in the HTML. When the user interacts with the toggle, you use JS to change the `content` attribute value to `light`, `dark`, or the initial value.

I know the upcoming User Preferences API would solve this even better (no flash of default color scheme on static sites on load), but maybe the proposed change in this issue would be implemented sooner.

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


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

Received on Thursday, 22 August 2024 01:02:20 UTC