rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
17.69k stars 1.61k forks source link

Print page is inheriting some theme colors #1934

Open ehuss opened 1 year ago

ehuss commented 1 year ago

On Chrome and Safari, the print page is inheriting some theme colors. This can make the print page unreadable, or somewhat ugly. Firefox does not seem to be affected.

Safari Light:

image

Safari Coal:

image
simonsan commented 1 year ago

Agreed, also that it would print a dark background when you have a dark theme applied (e.g. navy) is not really environmentally sustainable. I would even say that it should always print with the light theme applied.

@ehuss Could you give me a hint on where to implement that on behalf of the Rust Design patterns repo?

AlessandroMattiazzi commented 1 year ago

it seems that some tags are colored by the colors of the themes, a workaround can be to insert a custom css and add a similar code:

@media print {
  p {
         color: black;}
    }