Skip to content

Commit

Permalink
Fix line number widths (#31341) (#31343)
Browse files Browse the repository at this point in the history
Backport #31341 by silverwind

Co-authored-by: silverwind <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
  • Loading branch information
3 people authored Jun 13, 2024
1 parent 568ff10 commit 95dfd94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 9 additions & 0 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,13 @@ overflow-menu .ui.label {
padding: 0 8px;
text-align: right !important;
color: var(--color-text-light-2);
width: 1%; /* this apparently needs to be a percentage so that code column stretches in diffs */
min-width: 72px;
white-space: nowrap;
}

.code-diff .lines-num {
min-width: 50px;
}

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

.lines-type-marker {
vertical-align: top;
white-space: nowrap;
}

.lines-num,
Expand Down Expand Up @@ -1056,6 +1064,7 @@ overflow-menu .ui.label {

.lines-escape {
width: 0;
white-space: nowrap;
}

.lines-code {
Expand Down
8 changes: 0 additions & 8 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,6 @@ td .commit-summary {

.repository .diff-file-box .file-body.file-code .lines-num {
text-align: right;
width: 1%;
min-width: 50px;
}

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

.repository .diff-file-box .code-diff tbody tr td.lines-num,
.repository .diff-file-box .code-diff tbody tr td.lines-escape,
.repository .diff-file-box .code-diff tbody tr td.lines-type-marker {
white-space: nowrap;
}

.repository .diff-file-box .code-diff tbody tr td.center {
text-align: center;
}
Expand Down

0 comments on commit 95dfd94

Please sign in to comment.