From c2c7927414d9c9076300a7889f9571fa53871f18 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> Date: Fri, 4 Nov 2022 13:16:44 +0100 Subject: [PATCH] fix(editor): fix themes the monaco editor (no-changelog) (#4521) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(editor): fix dark mode for the monaco editor (no-changelog) just the default light and dark themes that are shipped with the editor Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ --- packages/editor-ui/src/components/forms/CodeEditor.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/editor-ui/src/components/forms/CodeEditor.vue b/packages/editor-ui/src/components/forms/CodeEditor.vue index a4ec7a3258..6ebe85a70c 100644 --- a/packages/editor-ui/src/components/forms/CodeEditor.vue +++ b/packages/editor-ui/src/components/forms/CodeEditor.vue @@ -61,13 +61,13 @@ export default Vue.extend({ } }); + const darkModeBetaEnabled = document.body.classList.contains('theme-dark-beta') && window.matchMedia('(prefers-color-scheme: dark)').matches; + monaco.editor.defineTheme('n8nCustomTheme', { - base: 'vs', + base: darkModeBetaEnabled ? 'vs-dark' : 'vs', inherit: true, rules: [], - colors: { - 'editor.background': '#f5f2f0', - }, + colors: {}, }); monaco.editor.setTheme('n8nCustomTheme'); @@ -129,7 +129,6 @@ export default Vue.extend({ .inputarea.ime-input, .margin { border-radius: var(--border-radius-base); - background-color: var(--color-background-xlight) !important; } } }