Consider setting color-scheme to opt-out of Chrome Auto Dark Themes
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 138
- Forks
- 26
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 3
Description
Chrome is working on a new auto dark feature:
Chrome 96 introduces an Origin Trial for Auto Dark Themes on Android. With this feature, the browser applies an automatically generated dark theme to light themed sites, when the user has opted into dark themes in the Operating System. Users can opt-out of dark themes by either disabling the option on the OS level or in a specific setting in Chrome.
https://developer.chrome.com/blog/auto-dark-theme/
Since Assembly doesn't currently have a dark-theme (#954), we should consider opting out until we do. Otherwise, we will lose control over how elements are displayed on a user's system if they have dark mode enabled. This could result in poor contrast that renders text difficult to read or UI elements not translating well.
There are a few options to opt out, but I think this option may work best for Assembly:
It is still possible to use this approach to opt-out the entire page from Auto Dark Theme by setting the color-scheme on the :root element:
:root { color-scheme: only light; }
Note: this feature is still being specified, but wanted to get ahead of it
https://bugs.chromium.org/p/chromium/issues/list?q=component:Mobile%3EAutoDarkTheme
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Assembly's global stylesheet or CSS entry point, since the issue does not name a file. Review Chrome's Auto Dark Theme opt-out guidance, then verify that applying the proposed root-level setting prevents automatic darkening without an existing dark theme; the issue is done when the page opts out consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100