Make nimble aware of prefers-color-scheme
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 39
- Forks
- 14
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 13
Description
😯 Problem to Solve
The browser has the prefers-color-scheme media query for letting web applications be aware of the operating system configured light / dark mode setting.
Nimble should be aware of that configuration so nimble applications can automatically adjust to the operating system configured theme preference.
💁 Proposed Solution
- Currently nimble's default theme is the Light theme. So if a user does not provide a
<nimble-theme-provider>on the page then the default theme value will belight. We should instead make the default theme be the OS configured theme setting. - Nimble theme-provider should have an option for the
themeproperty that allows explicitly configuring the OS specified preferred theme. ietheme = light | dark | color | platform
As part of a primeday project I prototyped with adding a platform option to the theme-provider's theme property.
We should still have an HLD to pin down the requirements and API for this change beyond the proposed solution.
📋 Tasks
- HLD
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 with the theme-provider entry point at packages/nimble-components/src/theme-provider/index.ts and review the linked prototype for the proposed platform option. Draft the required HLD to settle the theme API and prefers-color-scheme behavior. Done means the requirements are agreed and the theme provider can represent an explicitly selected or OS-preferred theme.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, typescript
- Domain
- design, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100