Closed fengtality closed 3 weeks ago
Hello @fengtality,
The light mode seems to be enforced when printing, based on the SCSS defined by MkDocs Material.
Now, concerning the accent colors not being respected, the issue seems to be coming from Paged.js after a quick look. I'll investigate further and provide a solution.
In the meantime, you may be able to override the CSS variables used by MkDocs Material during the rendering process (using the stylesheets
property of the exporter-pdf
plugin).
For instance, this documentation uses:
:root {
--md-primary-fg-color: #EA2027;
--md-accent-fg-color: #000000;
}
Closing for now, workarounds are available using CSS.
Suggestion: add a flag that lets users select certain color scheme
For instance, my site defaults to the
slate
(dark theme) but ideally I'd like the PDF exporter to use thedefault
(light) theme in generating documents