aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-06-03 19:21:45 +0200
committerGitHub <noreply@github.com>2024-06-03 17:21:45 +0000
commit0f0db6a14fd10a493ba73f211e2e627c3884d114 (patch)
tree5c7de8773de36f642182c2be4e03719ec908d64f
parentcb27c438a82fec9f2476f6058bc5dcda2617aab5 (diff)
downloadgitea-0f0db6a14fd10a493ba73f211e2e627c3884d114.tar.gz
gitea-0f0db6a14fd10a493ba73f211e2e627c3884d114.zip
Remove unnecessary inline style for tab-size (#31224)
Move the rule to the parent node. `tab-size` is inherited so will work just as before.
-rw-r--r--routers/web/repo/issue_content_history.go2
-rw-r--r--web_src/css/repo.css1
2 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/repo/issue_content_history.go b/routers/web/repo/issue_content_history.go
index bf3571c835..a7362113e3 100644
--- a/routers/web/repo/issue_content_history.go
+++ b/routers/web/repo/issue_content_history.go
@@ -156,7 +156,7 @@ func GetContentHistoryDetail(ctx *context.Context) {
// use chroma to render the diff html
diffHTMLBuf := bytes.Buffer{}
- diffHTMLBuf.WriteString("<pre class='chroma' style='tab-size: 4'>")
+ diffHTMLBuf.WriteString("<pre class='chroma'>")
for _, it := range diff {
if it.Type == diffmatchpatch.DiffInsert {
diffHTMLBuf.WriteString("<span class='gi'>")
diff --git a/web_src/css/repo.css b/web_src/css/repo.css
index d3036744fe..e44bc9811b 100644
--- a/web_src/css/repo.css
+++ b/web_src/css/repo.css
@@ -2322,6 +2322,7 @@ tbody.commit-list {
min-height: 12em;
max-height: calc(100vh - 10.5rem);
overflow-y: auto;
+ tab-size: 4;
}
.comment-diff-data pre {