gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 787 forks source link

HTML reports should set white as default background color #753

Open wildcart opened 7 years ago

wildcart commented 7 years ago

my desktop (and therefore the browsers) use a dark theme, ie light text on a dark background. Some browsers (but not all) set white as the default background color and black as default (text) color for HTML pages.

Firefox however does not (at least on Linux) and the HTML coverage reports become unreadable (see attached screenshot):

istanbul-dark_theme

The problem can be fixed by adding the following CSS snippet to the 'body' (possible 'body, html') declarations in base.css

background-color: white;

Thanks for considering Christian.

copycut commented 4 years ago

You can remove the height: 100% on base.css

body, html {
  margin:0; padding: 0;
  height: 100%;
}
jflip commented 2 years ago

Agree with this, using html preview in an IDE to view the report. Currently doing similar to the above and setting background-colour in base.css.

Considering all the styling only works on a white background anyway I think this is worth considering