From f144dc105108e1d0e981a5eb94aee662ae01bf37 Mon Sep 17 00:00:00 2001 From: bhsd <2545473905@qq.com> Date: Sat, 24 Aug 2024 01:37:56 +0800 Subject: [PATCH] CodeMirror 6 style for VE 2017 wikitext editor Styles for CM6 are not supposed to leak into non-CM VE surfaces. Bug: T373152 Change-Id: I32eea08961fc7b200d4b89d5fedf55b642fa3261 --- resources/ve-cm/ve.ui.CodeMirror.v6.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/ve-cm/ve.ui.CodeMirror.v6.less b/resources/ve-cm/ve.ui.CodeMirror.v6.less index 4210a65d..c8a10c2e 100644 --- a/resources/ve-cm/ve.ui.CodeMirror.v6.less +++ b/resources/ve-cm/ve.ui.CodeMirror.v6.less @@ -67,7 +67,7 @@ // Ensure surfaces are using identical font rules .cm-scroller, .cm-scroller *, - .ve-ui-mwWikitextSurface .ve-ce-paragraphNode { + .ext-codemirror-wrapper .ve-ce-paragraphNode { // The following are already set by mw-editfont-monospace on the parent: font-size, font-family word-wrap: break-word; // Support: Chrome<76, Firefox<69 @@ -102,11 +102,11 @@ font-weight: inherit; } - .mw-content-ltr .ve-ce-paragraphNode { + .ext-codemirror-wrapper .mw-content-ltr .ve-ce-paragraphNode { margin-left: 6px !important; /* stylelint-disable-line declaration-no-important */ } - .mw-content-rtl .ve-ce-paragraphNode { + .ext-codemirror-wrapper .mw-content-rtl .ve-ce-paragraphNode { /* @noflip */ margin-right: 6px !important; /* stylelint-disable-line declaration-no-important */ } @@ -117,7 +117,7 @@ } } -.ve-ce-documentNode-codeEditor-hide { +.ext-codemirror-wrapper .ve-ce-documentNode-codeEditor-hide { opacity: 0.4; &::selection, @@ -126,6 +126,6 @@ } } -.ve-ce-documentNode-codeEditor-webkit-hide { +.ext-codemirror-wrapper .ve-ce-documentNode-codeEditor-webkit-hide { -webkit-text-fill-color: transparent; }