Skip to content

Commit 87278c2

Browse files
committed
fix: Align code to the top when line wrapping is activated
1 parent fa3f7c4 commit 87278c2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/code-view/styles.scss

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,13 @@ $color-background-code-view-dark: #282c34;
3939
}
4040
}
4141

42-
.code-table-with-actions.code-table-with-line-wrapping {
43-
padding-inline-end: cs.$space-static-xxl;
44-
}
45-
4642
.screenreader-only {
4743
position: absolute;
4844
inset-block-start: -9999px;
4945
inset-inline-start: -9999px;
5046
}
5147

5248
.line-number {
53-
vertical-align: text-top;
5449
white-space: nowrap;
5550
position: sticky;
5651
inset-inline-start: 0;
@@ -84,6 +79,16 @@ $color-background-code-view-dark: #282c34;
8479
}
8580
}
8681

82+
.code-table-with-line-wrapping {
83+
.line-number,
84+
.code-line {
85+
vertical-align: text-top;
86+
}
87+
&.code-table-with-actions {
88+
padding-inline-end: cs.$space-static-xxl;
89+
}
90+
}
91+
8792
.actions {
8893
position: absolute;
8994
inset-block-start: cs.$space-scaled-xs;

0 commit comments

Comments
 (0)