From 0ce99319108cfba67e538e4d52e1a847d9c5ab35 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 11 May 2023 21:47:26 -0400 Subject: [PATCH] fix: Line numbers overlay code when block is horizontally scrollable --- shared/editor/components/Styles.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index b8a2342df..9c01e2447 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -1023,7 +1023,8 @@ mark { &:after { content: attr(data-line-numbers); position: absolute; - left: 1em; + padding-left: 1em; + left: 0; top: calc(1px + 0.75em); width: calc(var(--line-number-gutter-width,0) * 1em + .25em); word-break: break-all; @@ -1032,6 +1033,7 @@ mark { font-size: 13px; line-height: 1.4em; color: ${props.theme.textTertiary}; + background: ${props.theme.codeBackground}; text-align: right; font-variant-numeric: tabular-nums; user-select: none;