Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue#2010 CSS media query prefers-dark-mode
When you change to dark mode in your OS, your mocha tests in the browser will follow suit. There is a change needed in the javascript because the progress indicator canvas renders the 100% text in black. I first tried using CSS only by changing the canvas background to a darker gray which made the text visible but the circle was then surrounded by a gray square in both light and dark modes. I then tried changing the text color in the javascript to mochajs#888 as a middle point between black and white which was ok. In the end I used the existing two colors for the circle as outline and fill color for the text, which looks pretty good. I have tested this on Win10 Edge/Chrome switching the Color setting from control panel. The file browser-color-scheme-demo.html is for reviewer's convenience to see it working. Can be removed before final approval. The files screenshot-mocha-*.png are for reviewer's convenience also, can be kept(moved somewhere) for adding to the documentation or removed before final approval.
- Loading branch information