karma icon indicating copy to clipboard operation
karma copied to clipboard

Dark Mode

Open alexanderby opened this issue 3 years ago • 4 comments

Please add an ability to have a dark background in a testing browser window, so that it will not hurt eyes.

alexanderby avatar Nov 18 '20 16:11 alexanderby

I don't know what background you are looking at but try: http://karma-runner.github.io/5.2/dev/contributing.html

johnjbarton avatar Nov 18 '20 16:11 johnjbarton

See the attachment. I suggest a simple fix like @media (prefers-color-scheme: dark) {} to display dark body background when user wants to. ezgif-1-036892fe384e

alexanderby avatar Nov 18 '20 17:11 alexanderby

I fixed the issue by adding the following script to files config:

window.top.document.body.style.backgroundColor = '#222222';
window.top.document.body.style.color = '#dddddd';
window.top.document.getElementById('banner').style.backgroundColor = '#226644';

Now my eyes feel relaxed (only flashes when starts up, but I can close my eyes for a moment). Screen Shot 2020-11-19 at 12 44 34

alexanderby avatar Nov 19 '20 09:11 alexanderby

@alexanderby We have the docs in dark mode so a PR to change the test page would be welcome.

johnjbarton avatar Dec 24 '20 01:12 johnjbarton