-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support color scheme dark #4896
Conversation
|
2233984
to
4217396
Compare
Adds CSS for prefers-color-scheme: dark
4217396
to
4dada16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I will merge this in a few days. |
@outsideris please set the according labels, milestones and close the relevant issues. It's unfair - if you merge PR's - to leave the cleaning to others. Thank you. |
Sorry, I missed them. |
@outsideris have you tested anything of this before merging? How do you set the dark mode, how to overwrite the settings? Any docs? |
@juergba Sure. It follows the system theme on OS. I tested it on my macOS. |
Yes, Windows and Chrome. I have to refresh then the circle gets filled. |
Requirements
Description of the Change
Adds CSS to support prefers-color-scheme: dark as well as a small bit of JavaScript for the progress indicator.
Alternate Designs
Change the progress indicator to use SVG which can by styled by CSS. But one change at a time suggests that should be a separate change.
Why should this be in core?
Because bright screens can be annoying in certain situation. The motivation for adding a dark mode was I was working on a flight. All the window shades are pulled down. All the terminals and editors I run were in dark mode but then when I went to run the tests, BOOM!, I'm lighting up all the seats around me.
Benefits
People who like dark mode, which is becoming fairly popular, can get mocha in dark mode.
Possible Drawbacks
Browsers that don't support CSS
var
will have issues. Basically IEApplicable issues
#4895