UI: Preferred color scheme awareness #8271
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #6088
What I did
How to test
prefers-color-scheme
3a) Clear your localStorage and refresh the page if it's not already clean
If anyone has an idea for updating the tests for
create
andconvert
help would be greatly appreciated. Unfortunately I couldn't change the mock ofwatchMedia
during the test and therefore updating the existing tests to account for the preferred color scheme awareness wasn't possible. I decided to leave the existing tests as they still pass since thelight
theme is still handled as the default.