Skip to content

Commit 1da1e64

Browse files
Misc CSS fixes (#35888)
Fixes: #35913 Fixes: #35942 Contains a number of minor CSS fixes. --------- Signed-off-by: silverwind <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
1 parent e1372e5 commit 1da1e64

File tree

7 files changed

+27
-19
lines changed

7 files changed

+27
-19
lines changed

templates/repo/home_sidebar_bottom.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<div class="flex-item-title">
77
<a class="item muted" href="{{.RepoLink}}/releases">
88
{{ctx.Locale.Tr "repo.releases"}}
9-
<span class="ui small label">{{.NumReleases}}</span>
109
</a>
10+
<span class="ui small label">{{.NumReleases}}</span>
1111
</div>
1212
<div class="flex-item">
1313
<div class="flex-item-leading">

templates/repo/home_sidebar_top.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="flex-item">
1010
<div class="flex-item-main">
1111
<div class="flex-item-title">{{ctx.Locale.Tr "repo.repo_desc"}}</div>
12-
<div class="flex-item-body tw-text-16">
12+
<div class="flex-item-body tw-text-15">
1313
<div class="tw-flex tw-flex-col tw-gap-2 tw-mt-2">
1414
<div class="repo-description tw-break-anywhere tw-gap-2">
1515
{{- $description := .Repository.DescriptionHTML ctx -}}

templates/shared/search/code/results.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{range $result := .SearchResults}}
1313
{{$repo := or $.Repo (index $.RepoMaps .RepoID)}}
1414
<div class="diff-file-box file-content non-diff-file-content repo-search-result">
15-
<h4 class="ui top attached header tw-font-normal tw-flex tw-flex-wrap">
15+
<h4 class="ui top attached header tw-font-normal flex-text-block tw-flex-wrap tw-py-2">
1616
{{if not $.Repo}}
1717
<span class="file tw-flex-1">
1818
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>

web_src/css/repo.css

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,12 @@ td .commit-summary {
528528
}
529529

530530
.repository.view.issue .comment-list .timeline-item .comment-text-line {
531+
/* TODO: this "line-height" is not ideal (actually it is abused), many layouts depend on this magic value,
532+
for example: alignment of the header arrow and the avatar, view PR commit list left icon layout, dismiss review with reason, etc */
531533
line-height: 32px;
532534
vertical-align: middle;
533535
color: var(--color-text-light);
536+
min-width: 0;
534537
}
535538

536539
.repository.view.issue .comment-list .timeline-item .comment-text-line .ui.label {
@@ -601,9 +604,6 @@ td .commit-summary {
601604
width: 100%;
602605
margin: 0;
603606
}
604-
.repository.view.issue .comment-list .comment .content .form .button:not(:last-child) {
605-
margin-bottom: 1rem;
606-
}
607607
}
608608

609609
.repository.view.issue .comment-list .comment .merge-section {
@@ -654,7 +654,7 @@ td .commit-summary {
654654

655655
.repository.view.issue .comment-list .code-comment {
656656
border: 1px solid transparent;
657-
margin: 0;
657+
padding: 8px;
658658
}
659659

660660
.repository.view.issue .comment-list .code-comment .comment-header {
@@ -664,6 +664,7 @@ td .commit-summary {
664664
}
665665

666666
.repository.view.issue .comment-list .code-comment .comment-content {
667+
margin-top: 6px;
667668
margin-left: 24px;
668669
}
669670

@@ -1286,9 +1287,9 @@ td .commit-summary {
12861287
box-shadow: 0 0 0 3px var(--color-primary-alpha-30) !important;
12871288
}
12881289

1289-
.comment:target .header::before {
1290+
.comment:target .comment-header::before {
12901291
border-right-color: var(--color-primary) !important;
1291-
filter: drop-shadow(-3px 0 0 var(--color-primary-alpha-30)) !important;
1292+
filter: drop-shadow(-4px 0 0 var(--color-primary-alpha-30)) !important;
12921293
}
12931294

12941295
.code-comment:target,
@@ -1308,14 +1309,17 @@ td .commit-summary {
13081309
padding: 0.5em 1rem;
13091310
position: relative;
13101311
color: var(--color-text);
1311-
min-height: 41px;
13121312
display: flex;
13131313
justify-content: space-between;
13141314
align-items: center;
13151315
flex-wrap: wrap;
13161316
gap: 0.25em;
13171317
}
13181318

1319+
.comment-header.avatar-content-left-arrow {
1320+
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 */
1321+
}
1322+
13191323
.comment-header.avatar-content-left-arrow::after {
13201324
border-right-color: var(--color-box-header);
13211325
}
@@ -1339,14 +1343,18 @@ td .commit-summary {
13391343
.comment-header-right {
13401344
display: flex;
13411345
align-items: center;
1342-
gap: 0.5em;
1346+
gap: 6px;
13431347
}
13441348

13451349
.comment-header-right {
13461350
flex: 1;
13471351
justify-content: end;
13481352
}
13491353

1354+
.comment-header-right > .item.action {
1355+
padding: 4px; /* add some padding to make click area larger for the "item action ... ui dropdown" items */
1356+
}
1357+
13501358
.comment-body {
13511359
background: var(--color-box-body);
13521360
border: none !important;

web_src/css/repo/reactions.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
margin-left: 4px;
4242
}
4343

44-
.ui.dropdown.select-reaction .menu {
45-
min-width: 170px; /* item-outer-width * 4 */
44+
.ui.dropdown.select-reaction .menu.visible {
45+
display: grid !important;
46+
grid-template-columns: repeat(4, 1fr);
47+
padding: 4px;
4648
}
4749

4850
.ui.dropdown.select-reaction .menu > .item {
49-
float: left;
50-
margin: 4px;
51-
font-size: 20px;
5251
width: 34px;
5352
height: 34px;
53+
font-size: 16px;
5454
border-radius: var(--border-radius);
5555
display: flex;
5656
align-items: center;

web_src/css/review.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353

5454
.comment-code-cloud {
55-
padding: 0.5rem 1rem !important;
55+
padding: 0.5rem !important;
5656
position: relative;
5757
}
5858

web_src/js/components/RepoActionView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export default defineComponent({
489489
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
490490
{{ locale.cancel }}
491491
</button>
492-
<button class="ui basic small compact button link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
492+
<button class="ui basic small compact button link-action tw-shrink-0" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
493493
{{ locale.rerun_all }}
494494
</button>
495495
</div>
@@ -520,7 +520,7 @@ export default defineComponent({
520520
<span class="job-brief-name tw-mx-2 gt-ellipsis">{{ job.name }}</span>
521521
</div>
522522
<span class="job-brief-item-right">
523-
<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"/>
523+
<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"/>
524524
<span class="step-summary-duration">{{ job.duration }}</span>
525525
</span>
526526
</a>

0 commit comments

Comments
 (0)