Tables are not printing correctly
See original GitHub issueHello, today I’ve added feature to print tables from my website. Then I have noticed that tables with classes below are not printing correctly, although they are displayed correctly on screen.
-
<thead class="thead-dark">
- Header and font are both white so header is not readable -
<table class="table table-dark">
- Like header, whole table is white, including the font. -
<table class="table table-striped">
- There are no striped rows when printing. Class has no effect when printing. Print result is the same with and without it.
At first I suspected that something is wrong with my website (that my CSS is overriding Bootstrap CSS because it is linked after it), but then I tried to print tables from official Bootstrap website and got the same issue.
I’m using Bootstrap v4.0
Hope this will be resolved soon. Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
@mdo “Unsure how much we should override that, which would screw things up for folks who want that background-color”
Well, Bootstrap definitely overrides it and sets the background to white. Shouldn’t it be
inherit
so that you don’t override any colors that we’ve set in the table cell? Seems like Bootstrap is telling developers how things should print, instead of developers telling Bootstrap how it should print things.Did this ever get fixed? I’m using
v4.1.3
and rendering PDFs with puppeteer, but the coloring is still off. I’ve tried setting-webkit-print-color-adjust: exact;
on the appropriate elements as well.