about summary refs log tree commit diff stats
path: root/cgit.css
diff options
context:
space:
mode:
authorJune McEnroe2021-01-17 19:27:59 +0000
committerJune McEnroe2022-02-13 11:56:12 -0500
commitbe6a526a74199d1ff1cf69e5dff3171a63ffc7f7 (patch)
treea5acb376ca4f9928f76a3b65528e5588236c63c8 /cgit.css
parentUse buffered stdio (diff)
downloadcgit-be6a526a74199d1ff1cf69e5dff3171a63ffc7f7.tar.gz
cgit-be6a526a74199d1ff1cf69e5dff3171a63ffc7f7.zip
Use <pre> and <span> to print diffs
This correctly preserves whitespace in browsers without CSS, as an
alternative to [1].

[1]: https://80x24.org/cgit.git/commit/?id=7c692e6137697de8a8473c4de5c3de4fb03a2989
Diffstat (limited to 'cgit.css')
-rw-r--r--cgit.css14
1 files changed, 4 insertions, 10 deletions
diff --git a/cgit.css b/cgit.css index dac791b..36826b0 100644 --- a/cgit.css +++ b/cgit.css
@@ -533,26 +533,20 @@ div#cgit table.diff {
533 width: 100%; 533 width: 100%;
534} 534}
535 535
536div#cgit table.diff td { 536div#cgit table.diff td span.head {
537 font-family: monospace;
538 white-space: pre;
539}
540
541div#cgit table.diff td div.head {
542 font-weight: bold; 537 font-weight: bold;
543 margin-top: 1em;
544 color: black; 538 color: black;
545} 539}
546 540
547div#cgit table.diff td div.hunk { 541div#cgit table.diff td span.hunk {
548 color: #009; 542 color: #009;
549} 543}
550 544
551div#cgit table.diff td div.add { 545div#cgit table.diff td span.add {
552 color: green; 546 color: green;
553} 547}
554 548
555div#cgit table.diff td div.del { 549div#cgit table.diff td span.del {
556 color: red; 550 color: red;
557} 551}
558 552