Similar to T13374 for MediaWiki (resolved in 2012).
For Gerrit, it's much worse than it was for MediaWiki.
- The red is quite dark.
- We have red-on-red text (given syntax highlighting, e.g. red-keywords in red-removed lines of code).
- We have green-on-red text (e.g. green-comments in green-added lines of code).
- The green has a yellow hue in it, which is problematic for color-blind users.
From a brief chat with @Paladox, it seems there isn't a plugin interface for additional diff themes or syntax highlight themes in Gerrit. They are hardcoded in the CodeMirror library that Gerrit embeds.
However, the good news is that when Gerrit switches between code mirror themes, it does so by not only swapping out stylesheets, but also by adding an theme-identifiable class name to the document.
This means we could use our site-wide custom stylesheet (puppet: gerrit/GerritSite.css) to augment one of the existing themes to be more optimised for readability.
|default theme (unchanged)|
- Leave default unchanged.
- Provide 1 alternate diff theme that provides better contrast between foreground and background.
- Provide 1 alternate diff theme that is ideal for color-blindness, using the familiar MW's diff colors.
Better contrast ("eclipse") - read details at T232893#5492128
|eclipse theme (before)||eclipse theme (after)|
Colorblind friendly ("elegant") - read details at T232893#5493378
|elegent theme (before)||elegent theme (after)|