Several commits have been done to change the appearence of diffs to accomodate people with color blindness. However, some changes were not discussed. That is why I submit a new proposal that encompasses several changes detailed below.
Color changes:
- The lines in td.diff-deletedline is changed to have a soft yellow background, with the removed text having an amber background and black text in bold.
- The lines in td.diff-addedline is changed to have a light blue background, with the added text having a lavender background and black text in bold.
- The lines in td.diff-context will have a slightly lighter grey background.
Much consideration has been applied to make sure all used colors match in hue and brightness levels.
Text display changes:
- Instead of only the changed text being displayed with white-space:pre-wrap, the entire line in a cell is. This will show indents and any removed/added spaces, which greatly helps in code review.
- The font-size will be changed from 'smaller' to 88%, which will ensure a proper, legible font-size accross browsers.
Screenshot available at File:ProposedDiffChanges.png
To test the new color scheme, put the following in your CSS:
/* Diffs */ td.diff-context, td.diff-addedline, td.diff-deletedline { font-size: 88%; white-space: pre-wrap; } td.diff-context { background: #F2F2F2; } td.diff-addedline { background: #E0ECFF; } td.diff-deletedline { background: #FCF8CC; } td.diff-addedline .diffchange { background: #B0C8FF; color: #000; } td.diff-deletedline .diffchange { background: #FFD084; color: #000; }
Version: unspecified
Severity: enhancement