1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-21 21:58:21 +00:00

Misc CSS fixes (#35888)

Fixes: https://github.com/go-gitea/gitea/issues/35913
Fixes: https://github.com/go-gitea/gitea/issues/35942

Contains a number of minor CSS fixes.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind
2025-11-19 04:02:41 +01:00
committed by GitHub
parent e1372e5bc1
commit 1da1e644ed
7 changed files with 27 additions and 19 deletions

View File

@@ -6,8 +6,8 @@
<div class="flex-item-title"> <div class="flex-item-title">
<a class="item muted" href="{{.RepoLink}}/releases"> <a class="item muted" href="{{.RepoLink}}/releases">
{{ctx.Locale.Tr "repo.releases"}} {{ctx.Locale.Tr "repo.releases"}}
<span class="ui small label">{{.NumReleases}}</span>
</a> </a>
<span class="ui small label">{{.NumReleases}}</span>
</div> </div>
<div class="flex-item"> <div class="flex-item">
<div class="flex-item-leading"> <div class="flex-item-leading">

View File

@@ -9,7 +9,7 @@
<div class="flex-item"> <div class="flex-item">
<div class="flex-item-main"> <div class="flex-item-main">
<div class="flex-item-title">{{ctx.Locale.Tr "repo.repo_desc"}}</div> <div class="flex-item-title">{{ctx.Locale.Tr "repo.repo_desc"}}</div>
<div class="flex-item-body tw-text-16"> <div class="flex-item-body tw-text-15">
<div class="tw-flex tw-flex-col tw-gap-2 tw-mt-2"> <div class="tw-flex tw-flex-col tw-gap-2 tw-mt-2">
<div class="repo-description tw-break-anywhere tw-gap-2"> <div class="repo-description tw-break-anywhere tw-gap-2">
{{- $description := .Repository.DescriptionHTML ctx -}} {{- $description := .Repository.DescriptionHTML ctx -}}

View File

@@ -12,7 +12,7 @@
{{range $result := .SearchResults}} {{range $result := .SearchResults}}
{{$repo := or $.Repo (index $.RepoMaps .RepoID)}} {{$repo := or $.Repo (index $.RepoMaps .RepoID)}}
<div class="diff-file-box file-content non-diff-file-content repo-search-result"> <div class="diff-file-box file-content non-diff-file-content repo-search-result">
<h4 class="ui top attached header tw-font-normal tw-flex tw-flex-wrap"> <h4 class="ui top attached header tw-font-normal flex-text-block tw-flex-wrap tw-py-2">
{{if not $.Repo}} {{if not $.Repo}}
<span class="file tw-flex-1"> <span class="file tw-flex-1">
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a> <a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>

View File

@@ -528,9 +528,12 @@ td .commit-summary {
} }
.repository.view.issue .comment-list .timeline-item .comment-text-line { .repository.view.issue .comment-list .timeline-item .comment-text-line {
/* TODO: this "line-height" is not ideal (actually it is abused), many layouts depend on this magic value,
for example: alignment of the header arrow and the avatar, view PR commit list left icon layout, dismiss review with reason, etc */
line-height: 32px; line-height: 32px;
vertical-align: middle; vertical-align: middle;
color: var(--color-text-light); color: var(--color-text-light);
min-width: 0;
} }
.repository.view.issue .comment-list .timeline-item .comment-text-line .ui.label { .repository.view.issue .comment-list .timeline-item .comment-text-line .ui.label {
@@ -601,9 +604,6 @@ td .commit-summary {
width: 100%; width: 100%;
margin: 0; margin: 0;
} }
.repository.view.issue .comment-list .comment .content .form .button:not(:last-child) {
margin-bottom: 1rem;
}
} }
.repository.view.issue .comment-list .comment .merge-section { .repository.view.issue .comment-list .comment .merge-section {
@@ -654,7 +654,7 @@ td .commit-summary {
.repository.view.issue .comment-list .code-comment { .repository.view.issue .comment-list .code-comment {
border: 1px solid transparent; border: 1px solid transparent;
margin: 0; padding: 8px;
} }
.repository.view.issue .comment-list .code-comment .comment-header { .repository.view.issue .comment-list .code-comment .comment-header {
@@ -664,6 +664,7 @@ td .commit-summary {
} }
.repository.view.issue .comment-list .code-comment .comment-content { .repository.view.issue .comment-list .code-comment .comment-content {
margin-top: 6px;
margin-left: 24px; margin-left: 24px;
} }
@@ -1286,9 +1287,9 @@ td .commit-summary {
box-shadow: 0 0 0 3px var(--color-primary-alpha-30) !important; box-shadow: 0 0 0 3px var(--color-primary-alpha-30) !important;
} }
.comment:target .header::before { .comment:target .comment-header::before {
border-right-color: var(--color-primary) !important; border-right-color: var(--color-primary) !important;
filter: drop-shadow(-3px 0 0 var(--color-primary-alpha-30)) !important; filter: drop-shadow(-4px 0 0 var(--color-primary-alpha-30)) !important;
} }
.code-comment:target, .code-comment:target,
@@ -1308,7 +1309,6 @@ td .commit-summary {
padding: 0.5em 1rem; padding: 0.5em 1rem;
position: relative; position: relative;
color: var(--color-text); color: var(--color-text);
min-height: 41px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -1316,6 +1316,10 @@ td .commit-summary {
gap: 0.25em; gap: 0.25em;
} }
.comment-header.avatar-content-left-arrow {
min-height: 41px; /* for a comment header with left arrow, the arrow is absolutely positioned, but the header content varies (for example: no "roles", etc), so it needs a min-height */
}
.comment-header.avatar-content-left-arrow::after { .comment-header.avatar-content-left-arrow::after {
border-right-color: var(--color-box-header); border-right-color: var(--color-box-header);
} }
@@ -1339,7 +1343,7 @@ td .commit-summary {
.comment-header-right { .comment-header-right {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5em; gap: 6px;
} }
.comment-header-right { .comment-header-right {
@@ -1347,6 +1351,10 @@ td .commit-summary {
justify-content: end; justify-content: end;
} }
.comment-header-right > .item.action {
padding: 4px; /* add some padding to make click area larger for the "item action ... ui dropdown" items */
}
.comment-body { .comment-body {
background: var(--color-box-body); background: var(--color-box-body);
border: none !important; border: none !important;

View File

@@ -41,16 +41,16 @@
margin-left: 4px; margin-left: 4px;
} }
.ui.dropdown.select-reaction .menu { .ui.dropdown.select-reaction .menu.visible {
min-width: 170px; /* item-outer-width * 4 */ display: grid !important;
grid-template-columns: repeat(4, 1fr);
padding: 4px;
} }
.ui.dropdown.select-reaction .menu > .item { .ui.dropdown.select-reaction .menu > .item {
float: left;
margin: 4px;
font-size: 20px;
width: 34px; width: 34px;
height: 34px; height: 34px;
font-size: 16px;
border-radius: var(--border-radius); border-radius: var(--border-radius);
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -52,7 +52,7 @@
} }
.comment-code-cloud { .comment-code-cloud {
padding: 0.5rem 1rem !important; padding: 0.5rem !important;
position: relative; position: relative;
} }

View File

@@ -489,7 +489,7 @@ export default defineComponent({
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel"> <button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
{{ locale.cancel }} {{ locale.cancel }}
</button> </button>
<button class="ui basic small compact button link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun"> <button class="ui basic small compact button link-action tw-shrink-0" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
{{ locale.rerun_all }} {{ locale.rerun_all }}
</button> </button>
</div> </div>
@@ -520,7 +520,7 @@ export default defineComponent({
<span class="job-brief-name tw-mx-2 gt-ellipsis">{{ job.name }}</span> <span class="job-brief-name tw-mx-2 gt-ellipsis">{{ job.name }}</span>
</div> </div>
<span class="job-brief-item-right"> <span class="job-brief-item-right">
<SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun tw-mx-2 link-action" :data-url="`${run.link}/jobs/${index}/rerun`" v-if="job.canRerun"/> <SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun tw-mx-2 link-action interact-fg" :data-url="`${run.link}/jobs/${index}/rerun`" v-if="job.canRerun"/>
<span class="step-summary-duration">{{ job.duration }}</span> <span class="step-summary-duration">{{ job.duration }}</span>
</span> </span>
</a> </a>