Repository: rust-lang/mdBook (language: rust)

Issue:
Incorrect color for print page inline code blocks in headers
Inline code blocks in headers are rendered with a black background on Safari and Chrome. This does not seem to affect Firefox.

Chrome:

<img width="229" alt="image" src="https://user-images.githubusercontent.com/43198/203125577-17847c3a-04d9-4efa-9fb6-e174646258c6.png">

Safari:

<img width="260" alt="image" src="https://user-images.githubusercontent.com/43198/203125700-b418fde8-bd27-4c17-8533-44c595a10ba8.png">

Firefox:

<img width="222" alt="image" src="https://user-images.githubusercontent.com/43198/203125786-bad89449-00f4-4d28-b46c-393fc16685b2.png">



Discussion / hints:
I suspect the problem stems from src/theme/css/print.css

You might have accidentally turned on 'print' preview layout in your CSS inspector in those browsers.

Can the background-color be removed, or was there a reasoning for this during print?

```css
code {
    background-color: #666666;
    border-radius: 5px;

    /* Force background to be printed in Chrome */
    -webkit-print-color-adjust: exact;
}
```
I believe @ehuss meant the print preview - look at the issue title.

Several related issues here:

* The dark gray background is probably not a good choice for printing on paper.
* The foreground color comes from from the theme, it's discussed in #1934.
* The foreground/background combination may be hard to read.
* The behavior across browsers should be consistent, but it's not.
* The PDF output generate by mdbook-pdf is affected, the result is hard to read in some PDF reader apps, see https://github.com/HollowMan6/mdbook-pdf/issues/26

Fix patch:
diff --git a/src/theme/css/print.css b/src/theme/css/print.css
index 5e690f7559..27d05e9285 100644
--- a/src/theme/css/print.css
+++ b/src/theme/css/print.css
@@ -22,14 +22,6 @@
     overflow-y: initial;
 }
 
-code {
-    background-color: #666666;
-    border-radius: 5px;
-
-    /* Force background to be printed in Chrome */
-    -webkit-print-color-adjust: exact;
-}
-
 pre > .buttons {
     z-index: 2;
 }


Test patch: