I use the minimal theme, and this snippet makes some assumptions based on that–but you should be able to adapt it to your needs. It also assumes that your theme color choices contrast well with white paper.
4 Likes
Is there a way to adapt this CSS to fit Minimal Theme Dark, i.e. PDF with black background, white texte and colored titles ?
@Flavinsh I use Minimal in dark mode, and the snippet is designed to undo it so the results are suitable for printing.
If you remove the color
, background
, and background-color
directives, the colors of your theme should come through. 'colorhandles the color of text.
backgroundand
background-colorcontrol the, um, background. For instance, the
background: none;` on line 19 removes the dark background of dark mode from the entire document.
Once you do this, you may need to add color
directive to certain selectors (and you may need to add selectors that are not currently styled) to lighten the text of certain elements.