php / web-doc

http://doc.php.net
33 stars 85 forks source link

Add background colors to changed lines #27

Closed lhsazevedo closed 2 years ago

lhsazevedo commented 2 years ago

Add a background color to changed lines, making changes easier to see. If you prefer, I can extract these styles into CSS classes.

Before: image

After: image

It is especially helpful for empty line changes: before after

lhsazevedo commented 2 years ago

Great, thank you @nilgun

Should we also lower the diff font size a bit? Our diff font is at 16px, great for body text but a little bit large for code. Diffs here on GitHub have a font-size of 12px. Maybe we can experiment with 14px?

Another change that may help reading diffs is to display the line number on each line.

If you guys are OK with style PRs, just let me know.