zachleat / zachleat/solar-eclipse-toggle
Make toggle useful or hide without CSS
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 10
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Where CSS is disabled, the toggle shows and controls Dark/Light mode state but that control is only of what's in Local Storage, there's no visual change to the page.
The toggle could change page appearance, even when CSS is off, by changing the page's <meta name="color-scheme"> content, e.g. from "light dark" to just "dark". Of course, this can only occur on pages that have that element. I don't know if using this approach could replace some use of the color-scheme property within theme CSS.
But when CSS is disabled, maybe it makes more sense to let the user's prefers-color-scheme dictate the mode; that's what happens today. In that case, I'd either hide the solar eclipse toggle entirely or create a new disabled state, not HTML's disabled but changed to show something like "⊘ theming disabled" and for clicking to do nothing, visually and non-visually.
Contributor guide
No contributing guide indexed for this repository
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 the solar eclipse toggle and the pages containing a element. The issue presents alternative behaviors for CSS-disabled pages, so first clarify which behavior is wanted; done should include a defined toggle state and interaction that remains correct when CSS is disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100