diff options
author | June McEnroe <june@causal.agency> | 2021-01-17 19:27:59 +0000 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-01-17 20:03:45 +0000 |
commit | 83c1c6bedbf9d6be1c7e0220dd69844c7265f527 (patch) | |
tree | a3805a83766957b69ce4658d17cb2bdb09caac00 /www/git.causal.agency/cgit/cgit.c | |
parent | Ignore cgit/git (diff) | |
download | src-83c1c6bedbf9d6be1c7e0220dd69844c7265f527.tar.gz src-83c1c6bedbf9d6be1c7e0220dd69844c7265f527.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-- | www/git.causal.agency/cgit/cgit.css | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/www/git.causal.agency/cgit/cgit.css b/www/git.causal.agency/cgit/cgit.css index dac791b6..36826b07 100644 --- a/www/git.causal.agency/cgit/cgit.css +++ b/www/git.causal.agency/cgit/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; } |