From f409b96f0026fc8c856d4aefe986f624c063bfca Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Mon, 24 Apr 2023 10:34:24 +0100 Subject: [PATCH] Fix padding in emptyLineFiller and lineWrappingIndentation extensions (#12736) GitOrigin-RevId: 8b6a2ad0beb802d917f3e998c378792c6156836a --- .../js/features/source-editor/extensions/empty-line-filler.ts | 3 +-- .../source-editor/extensions/line-wrapping-indentation.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/extensions/empty-line-filler.ts b/services/web/frontend/js/features/source-editor/extensions/empty-line-filler.ts index 8365d59e88..94b839390e 100644 --- a/services/web/frontend/js/features/source-editor/extensions/empty-line-filler.ts +++ b/services/web/frontend/js/features/source-editor/extensions/empty-line-filler.ts @@ -68,8 +68,7 @@ export const emptyLineFiller = () => { ), EditorView.baseTheme({ '.ol-cm-filler': { - display: 'inline', - padding: '2px', + padding: '0 2px', }, }), ] diff --git a/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts b/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts index 2c0605994b..fc79588ef4 100644 --- a/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts +++ b/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts @@ -122,7 +122,7 @@ const lineIndentDecoration = (indent: number) => Decoration.line({ attributes: { // style: `text-indent: ${indent}ch hanging`, // "hanging" would be ideal, when browsers support it - style: `text-indent: -${indent}ch; padding-left: calc(${indent}ch + 4px)`, // add 4px to account for existing padding-left + style: `text-indent: -${indent}ch; padding-left: calc(${indent}ch + 6px)`, // add 6px to account for existing padding-left }, })