background-color is ignored
I am trying to use background-color in my CSS file using targetStyles: ['*'] for html to call it, but background-color is never applied. And when I change it to color, it works as intended.
Hi @LeaGoarant, by default most browser's won't print the HTML background color. Try printing this very page and see how the browser ignores the grey background color from Github's top navigation bar. If you go into your browser settings, you should see an option to enable and disable this. Since this is a local user browser preference, we can't control it with Javascript alone.
I had no idea about that ! Just want to add if other people cross this problem, that it can be easily fix by adding color-adjust:exact;.
Awesome! I wasn't aware of this. Thanks for sharing, Lea.
For ref.: https://developer.mozilla.org/en-US/docs/Web/CSS/color-adjust
I found that color-adjust: exact; doesn't work in chrome 89, while -webkit-print-color-adjust: exact; is effective. You can try adding a browser prefix.
