AvaloniaUI / avalonia-docs

https://docs.avaloniaui.net/docs/welcome
60 stars 189 forks source link

Dark mode syntax highlighting is mediocre #461

Closed stevemonaco closed 5 months ago

stevemonaco commented 5 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 5 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