Skip to content

Commit 95dfd94

Browse files
GiteaBotsilverwindwxiaoguang
authored
Fix line number widths (#31341) (#31343)
Backport #31341 by silverwind Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 parent 568ff10 commit 95dfd94

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

web_src/css/base.css

+9
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,13 @@ overflow-menu .ui.label {
10051005
padding: 0 8px;
10061006
text-align: right !important;
10071007
color: var(--color-text-light-2);
1008+
width: 1%; /* this apparently needs to be a percentage so that code column stretches in diffs */
1009+
min-width: 72px;
1010+
white-space: nowrap;
1011+
}
1012+
1013+
.code-diff .lines-num {
1014+
min-width: 50px;
10081015
}
10091016

10101017
.lines-num span.bottom-line::after {
@@ -1024,6 +1031,7 @@ overflow-menu .ui.label {
10241031

10251032
.lines-type-marker {
10261033
vertical-align: top;
1034+
white-space: nowrap;
10271035
}
10281036

10291037
.lines-num,
@@ -1056,6 +1064,7 @@ overflow-menu .ui.label {
10561064

10571065
.lines-escape {
10581066
width: 0;
1067+
white-space: nowrap;
10591068
}
10601069

10611070
.lines-code {

web_src/css/repo.css

-8
Original file line numberDiff line numberDiff line change
@@ -1555,8 +1555,6 @@ td .commit-summary {
15551555

15561556
.repository .diff-file-box .file-body.file-code .lines-num {
15571557
text-align: right;
1558-
width: 1%;
1559-
min-width: 50px;
15601558
}
15611559

15621560
.repository .diff-file-box .file-body.file-code .lines-num span.fold {
@@ -1582,12 +1580,6 @@ td .commit-summary {
15821580
table-layout: fixed;
15831581
}
15841582

1585-
.repository .diff-file-box .code-diff tbody tr td.lines-num,
1586-
.repository .diff-file-box .code-diff tbody tr td.lines-escape,
1587-
.repository .diff-file-box .code-diff tbody tr td.lines-type-marker {
1588-
white-space: nowrap;
1589-
}
1590-
15911583
.repository .diff-file-box .code-diff tbody tr td.center {
15921584
text-align: center;
15931585
}

0 commit comments

Comments
 (0)