Closed fortunewalla closed 1 year ago
Hi,
you are right, hardcoded colors are bad.
There should be proper class names, to be able to add a dark style (css).
I found the reason for this issue.
There are two html formatter classes available in the syntax highlighting lib ColorCode.
The one currenty used is: https://github.com/RichardSlater/ColorCodePortable/blob/master/ColorCode/Formatting/HtmlFormatter.cs -> which outputs hardcoded colors.
The other one outputs proper class names: https://github.com/RichardSlater/ColorCodePortable/blob/master/ColorCode/Formatting/HtmlClassFormatter.cs
I will change the implementation to use the class HtmlClassFormatter.cs .
But that also requires add the classes to style.css
and style-dark.css
.
fixed in release 0.7.2
In dark mode, the default code & monospace colors are too bright for dark mode. Can you make the default code colors the same as general text dark mode colors?
Yes, we can tweak the CSS file but the generated HTML file uses the DIV color names 'black' & 'white' which are hardcoded.
Example:
Thanks for your hard work so far. 🙏🏼
1/2 NPP Default Light Mode & corresponding Markdown Panel colors:
2/2 NPP Default Dark Mode & corresponding Markdown Panel colors: