Fix code view (diff) broken layout (#23096)
Close #22911 I think it's ready for review now, feel free to test it, welcome to help to improve. ### Before  ### After 
This commit is contained in:
parent
d93f3222a5
commit
d149093ce3
7 changed files with 33 additions and 38 deletions
|
@ -1806,8 +1806,14 @@
|
|||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.repository .diff-file-box .code-diff tbody tr td.halfwidth {
|
||||
width: 49%; /* halfwidth is used in split view - and in that case, 1% of each */
|
||||
.repository .diff-file-box .code-diff table {
|
||||
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 {
|
||||
|
|
|
@ -53,12 +53,6 @@
|
|||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.add-comment .lines-num,
|
||||
.add-comment .lines-escape,
|
||||
.add-comment .lines-type-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.show-outdated:hover,
|
||||
.hide-outdated:hover {
|
||||
text-decoration: underline;
|
||||
|
|
|
@ -504,18 +504,9 @@ export function initRepoPullRequestReview() {
|
|||
ntr = $(`
|
||||
<tr class="add-comment" data-line-type="${lineType}">
|
||||
${isSplit ? `
|
||||
<td class="lines-num"></td>
|
||||
<td class="lines-escape"></td>
|
||||
<td class="lines-type-marker"></td>
|
||||
<td class="add-comment-left" colspan="4"></td>
|
||||
<td class="lines-num"></td>
|
||||
<td class="lines-escape"></td>
|
||||
<td class="lines-type-marker"></td>
|
||||
<td class="add-comment-right" colspan="4"></td>
|
||||
` : `
|
||||
<td class="lines-num"></td>
|
||||
<td class="lines-num"></td>
|
||||
<td class="lines-escape"></td>
|
||||
<td class="add-comment-left add-comment-right" colspan="5"></td>
|
||||
`}
|
||||
</tr>`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue