AvaloniaUI / avalonia-docs

https://docs.avaloniaui.net/docs/welcome
64 stars 213 forks source link

Dark mode syntax highlighting is mediocre #461

Closed stevemonaco closed 7 months ago

stevemonaco commented 7 months ago

The current dark mode syntax highlighting theme uses Dracula which looks like this for the two most relevant languages (C# and XML):

image image

Notice how there are only three colors (including white) for XML and it oddly chooses to italicize keywords in C#. The current light mode theme (GitHub) does not suffer from this issue.

I recommend that docs move to a theme that is better suited. Here is what require('prism-react-renderer').themes.vsDark; looks like when applied to the same page:

image

image

I can PR this if this theme change is acceptable. This only affects syntax highlighting blocks, AFAIK, and the rest of the site remains the same.

stevemonaco commented 7 months ago

There are also small changes to code blocks that don't have a specified language. There are very few of these in docs. Single tick highlights aren't code blocks, so they aren't affected.

Current (dracula): image

Proposed (vsDark): image