From 373a8321f0a3b7cec933f9aa94dc153ad502f390 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Wed, 5 Mar 2025 05:59:16 +0000 Subject: cgit tab size 4 for commit and diff code cgit commit and diff code show tab size as 8, e.g., [this commit][1] and [this diff][2] and [this diff][2]. I prefer tab size 4. So I looked at /usr/share/webapps/cgit/cgit.css and changed accordingly. I also make pre element more specific. Note in CSS, `#` is id selector, see [this link][3]. `div pre` is descendant combinator, see [this link][4]. [1]:https://git.flylightning.xyz/fsh/commit/sh/news?id=b13a0c1b7b5d24a4c0790279e10c89f94253c6c6 [2]:https://git.flylightning.xyz/fsh/diff/sh/news?id=b13a0c1b7b5d24a4c0790279e10c89f94253c6c6 [3]:https://www.w3schools.com/css/css_selectors.asp [4]:https://www.w3schools.com/css/css_combinators.asp --- usr/share/webapps/cgit/mycgit.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/share/webapps/cgit/mycgit.css b/usr/share/webapps/cgit/mycgit.css index 25d03b62..bc1ac964 100644 --- a/usr/share/webapps/cgit/mycgit.css +++ b/usr/share/webapps/cgit/mycgit.css @@ -1,4 +1,6 @@ @import "cgit.css"; @import "highlight.css"; -pre { tab-size: 4; } +div#cgit pre { tab-size: 4; } + +div#cgit table.diff { tab-size: 4; } -- cgit v1.2.3-70-g09d2