typora-issues
typora-issues copied to clipboard
[Feature] Allow printing with print-ready dark themes (like Typora Themeable)
Typora currently displays the following warning when attempting to print while using a "dark" theme variant:

This dialog prevents printing unnecessarily in the following scenarios:
- When a theme auto-switches between light and dark mode variants based on the OS-level preference. In this scenario, the default (or
prefers-color-scheme: light
) styles will be used for printing even when the OS is displaying content on the screen in dark mode:body { background: white; color: black; } @media screen and (prefers-color-scheme: dark) { body { background: black; color: white; } }
- When a dark theme includes
@media print
styles that make it suitable for printing:body { background: black; color: white; } @media print { body { background: black; color: white; } }
Typora Themeable is one example of a theme that does both of these things, and as a result both the auto-switching variant (themeable.css) and dark-only variant (theme able-dark.css) are prevented from printing unnecessarily.
A few suggestions:
- Instead of preventing users from printing when using a dark theme, warn them that their current "dark" theme may not be optimized for printing but give them the option to proceed anyway. In most operating systems a print preview will be displayed before printing occurs which will allow users to determine if their theme is print-compatible.
- Provide users with a "don't show me this warning again" option so they don't have to see the above warning every time they print with a dark theme.
- Let users select a theme for printing within the app preferences the same way the can for exports. I was surprised this was not already possible given that the "Export" preference pane includes an icon of a printer.
- Consider presenting users with print/export options via a dialog when they print/export. This would increase awareness of print/export-related preferences that users may otherwise be unaware of and allow them to modify these settings for each print/export job.
Happy to discuss further and work out the details. Thx!