Description
When the app is switched to dark mode, the syntax highlighting CSS remains the light (github) highlight.js theme. As a result, some tokens (e.g., string literals) have very low contrast against the dark background—for example, the value 'alice' in code blocks becomes hard to read.
Steps to reproduce
- Open the app and click the dark mode toggle.
- Paste or open a code block such as:
- Observe the string token color has poor contrast (see screenshot below).
Expected
Syntax highlighting should use colors suitable for the dark background (either by swapping to a dark highlight.js theme or by providing CSS overrides).
Proposed fix
- Update the theme toggle to swap the highlight.js stylesheet between the light and dark highlight.js themes, or
- Add dark-mode CSS overrides for .hljs-* token classes.
Environment
Web app, latest commit.
Screenshot
