Getting `code` items to print out

Is there a way to get this to print out correctly?

I’m not exactly familiar with how printing on a web document works in general

Why isn’t my code snippet items printing?

I have no CSS modifying those items (highlighted in green)

As I understand it, the color and background color is applied by our theme template (default, dark, sepia, etc), which isn’t applied when printing. The reason for that is so that themes don’t affect the printed page (for example, dark theme doesn’t get applied to printing)

We’re in the works to refactor the theme-related CSS, so a possible fix would be to add a print-specific theme.


1 Like

Yeah, I agree with what Shida said, namely that the printed version is less colorful to make it friendly to the printer, and the code snippet loses its font color and background as a result.

Are you asking why they’re not printed exactly as they’re shown? They are indeed printed.

1 Like

+1 this would be nice to have. the `code snipppets` are definitely the ones I would like the most of

Perhaps use something similar to stackoverflow’s CSS printing would make the most sense (e.g. give code snippets a specific color-font with no background)

They have syntax highlighting so that’s more natural. Someday!