[mediaqueries-5] Ability to detect a preference override being cleared
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 24
Description
I’m implementing a little demo of a dark mode toggle as part of https://github.com/mdn/content/pull/43276. While doing so, I noticed that the change event isn’t fired if the old override matches the UA provided value.
In other words, change fires if value changes, not if override changes.
It would be useful to detect changes of the override value. This is needed for example to update a dark mode toggle which has the option System default.
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 mediaqueries-5 issue and the dark mode toggle context described in MDN content PR 43276. Examine how the change event currently depends on the value rather than the override, then define behavior for detecting an override being cleared. Done means a System default toggle can observe that transition, including when the old override matches the UA-provided value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100