mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 00:44:24 +01:00
More fixes for the "commit-body" (#26898)
The changes for "commit-body" in #26877 are not ideal. The reason is: the "commit-body" is usually a `<pre>`, it has default margins. In most cases, we do not need that large margin. So, this PR introduces a general but small margin for all "commit-body" elements. Then these `gt-m-0` could be removed. The `:not` selector is not needed, because the `.timeline-item` selector is already clear enough.
This commit is contained in:
parent
c17fd68be7
commit
682552378f
3 changed files with 5 additions and 4 deletions
|
@ -135,7 +135,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{if IsMultilineCommitMessage .Commit.Message}}
|
{{if IsMultilineCommitMessage .Commit.Message}}
|
||||||
<pre class="commit-body gt-mt-0">{{RenderCommitBody $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
|
<pre class="commit-body">{{RenderCommitBody $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/commit_load_branches_and_tags" .}}
|
{{template "repo/commit_load_branches_and_tags" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $}}
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $}}
|
||||||
{{if IsMultilineCommitMessage .Message}}
|
{{if IsMultilineCommitMessage .Message}}
|
||||||
<pre class="commit-body gt-m-0 gt-hidden">{{RenderCommitBody $.Context .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
|
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
{{if .Committer}}
|
{{if .Committer}}
|
||||||
|
|
|
@ -2620,13 +2620,14 @@ tbody.commit-list {
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-body {
|
.commit-body {
|
||||||
|
margin: 0.25em 0;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PR-comment */
|
/* PR-comment */
|
||||||
.repository:not(.diff) .timeline-item .commit-body {
|
.repository .timeline-item .commit-body {
|
||||||
margin-left: 40px;
|
margin-left: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.git-notes.top {
|
.git-notes.top {
|
||||||
|
|
Loading…
Reference in a new issue