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
committerJune McEnroe <june@causal.agency>2022-02-13 11:56:12 -0500
commitbe6a526a74199d1ff1cf69e5dff3171a63ffc7f7 (patch)
treea5acb376ca4f9928f76a3b65528e5588236c63c8 /cgit.css
parentUse buffered stdio (diff)
downloadcgit-pink-be6a526a74199d1ff1cf69e5dff3171a63ffc7f7.tar.gz
cgit-pink-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 '')
-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 {
 	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;
 }