about summary refs log tree commit diff
path: root/cgit.css
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-17 19:27:59 +0000
committerRory& <root@rory.gay>2025-03-12 06:35:09 +0100
commit52b1cfe49cb536a3460f2a849991623f47ed10a9 (patch)
tree599ab3955a548040b2ce664d3ac9b4526eac528a /cgit.css
parentUse buffered stdio (diff)
downloadcgit-magenta-52b1cfe49cb536a3460f2a849991623f47ed10a9.tar.xz
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 1fbab2e..51ddbf8 100644 --- a/cgit.css +++ b/cgit.css
@@ -537,26 +537,20 @@ div#cgit table.diff { width: 100%; } -div#cgit table.diff td { - font-family: monospace; - white-space: pre; -} - -div#cgit table.diff td div.head { +div#cgit table.diff td span.head { font-weight: bold; - margin-top: 1em; color: black; } -div#cgit table.diff td div.hunk { +div#cgit table.diff td span.hunk { color: #009; } -div#cgit table.diff td div.add { +div#cgit table.diff td span.add { color: green; } -div#cgit table.diff td div.del { +div#cgit table.diff td span.del { color: red; }