-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DARK MODE! #451
Merged
Merged
DARK MODE! #451
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Needs a lot more color overrides, sanity checking, actual code to set it, etc. but hey - it's a start! Made to address #450...and because it's fun.
Closed
This hooks up the color scheme to options, adds it to docs, etc. There's a "light" (previous and still default), "dark" (yeah...it's dark, what do you want me to say?) and "auto", which picks "dark" based on the browser's preference.
There was a test checking for the start of the .css which I changed...fun!
This does it all in JS to keep us consistent (thought about the rendering code doing it but....nah). This makes the full page variants respect dark mode and fills in a few missing colors.
Also surfaces ColorScheme up through the layers and to the tag helper.
Closed
NickCraver
added a commit
that referenced
this pull request
Apr 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Made to address #450...and because it's fun! Since MiniProfiler no longer supports IE 11, we can take advantage of CSS variables and help some users here.
Note: this isn't only dark mode. It's really 2 things:
Overall, this also allows a user to theme these variables however they want - it's not limited to the 2 included themes, that's just what's "in-box". I need to consult some experts but I'd love to also add a "High Contrast" theme to help another set of users...we just need color codes for it.
Here are some screens of dark mode (light is equivalent to today):
Full pages respect this theme setting as well: