MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.43k stars 1.09k forks source link

Support light/dark mode in the Rendering CSS and Themes #1135

Open ian-twilightcoder opened 4 years ago

ian-twilightcoder commented 4 years ago

All of the built-in CSS and syntax highlighted code block Themes in Rendering should support light/dark mode with prefers-color-scheme. (The Mozilla page has some easier to understand examples.)

Or maybe there should be light/dark variants for the preview pane, but exporting to HTML or copying to clipboard should use prefers-color-scheme.

FranklinYu commented 4 years ago

I really like the idea of prefers-color-scheme, but then when you copy the exported HTML to others, they may view it differently than you. This is expected (even slightly preferred) for me, but I’m not sure how a normal users would think.

Or maybe there should be light/dark variants for the preview pane, but exporting to HTML or copying to clipboard should use prefers-color-scheme.

This is more work to implement. I would prefer simply using the CSS media trick.

ian-twilightcoder commented 4 years ago

It's preferred for me too. I work in light mode, but when I send the HTML to people who use dark mode they want to view it dark. I would think that to be the common case given that Markdown is usually used for technical documentation and proposals, and not fully formatted documents.