From c4286f2bef8fd6896f150ce64b98c121abf51ebe Mon Sep 17 00:00:00 2001 From: MusikAnimal Date: Thu, 31 Oct 2024 16:17:05 -0400 Subject: [PATCH] ve.ui.CodeMirror.v6: don't auto-flip CSS rules affecting gutter RTL rules within and around the content need to apply to the content language, not the interface language, so we want to disable the normal CSSJanus auto-flipping. Bug: T357482 Bug: T374196 Change-Id: If0becbf7e0baa61118a22af375be0d107567226d --- resources/ve-cm/ve.ui.CodeMirror.v6.less | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/resources/ve-cm/ve.ui.CodeMirror.v6.less b/resources/ve-cm/ve.ui.CodeMirror.v6.less index b36ffeaa..0869455c 100644 --- a/resources/ve-cm/ve.ui.CodeMirror.v6.less +++ b/resources/ve-cm/ve.ui.CodeMirror.v6.less @@ -28,8 +28,14 @@ } } + .cm-gutterElement { + /* @noflip */ + padding: 0 3px 0 4px !important; /* stylelint-disable-line declaration-no-important */ + } + .cm-gutters { background-color: transparent; + /* @noflip */ padding-right: 8px; /* @noflip */ border-right: 0; @@ -41,6 +47,11 @@ padding-left: 8px; /* @noflip */ padding-right: initial; + + .cm-gutterElement { + /* @noflip */ + text-align: left; + } } .cm-focused { @@ -55,11 +66,6 @@ padding: 0; } - .cm-gutterElement { - // stylelint-disable-next-line declaration-no-important - padding: 0 3px 0 4px !important; - } - .CodeMirror-selected { display: none; } @@ -107,6 +113,7 @@ } .ext-codemirror-wrapper .mw-content-ltr .ve-ce-paragraphNode { + /* @noflip */ margin-left: 6px !important; /* stylelint-disable-line declaration-no-important */ }