Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mediaqueries-5] How does script control of preferences work with forced color schemes? #11575

Open
lukewarlow opened this issue Jan 27, 2025 · 1 comment

Comments

@lukewarlow
Copy link
Member

Currently you can set a color scheme on your site, which allows you to specify which colour schemes you support.

Some browsers allow the user to force a specific color scheme on a site even if it only supports light mode by default.

This can be disabled by using the light only value for the color-scheme property or meta tag.

What behaviour should preference overrides have? light - where the browser force dark mode wins, or light only where the users choice for the site overrides the browsers force dark mode?

@lukewarlow
Copy link
Member Author

Currently the Chromium prototype just sets the value rather than forcing it to only such that force dark mode does win over the site preference override. I think this is wrong, and the site override should win. However, I'd be very interested to hear the views of the wider group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant