[chore/themes] Add auto-switching themes for blurple/brutalist/solarized #3588
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.
Description
Added auto-switching variants for themes that have both light and dark versions (blurple, brutalist, and solarized). These new variants use
prefers-color-scheme
media query to automatically switch between light and dark themes based on user's system preferences, as discussed in #1214 .Each auto theme defaults to its dark version if
prefers-color-scheme
is not supported by the browser, while brutalist default tobrutalist.css
(the light version).The auto-switching theme uses import to load the corresponding light/dark version themes. This way, in the future, they'll automatically follow the update, thus barely add any maintenance workload.
TODO
If this PR meets expectations and gets merged, the next step is to
Checklist
Please put an x inside each checkbox to indicate that you've read and followed it:
[ ]
->[x]
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
go fmt ./...
andgolangci-lint run
.