Skip to content

Commit

Permalink
fix(editor): fix themes the monaco editor (no-changelog) (#4521)
Browse files Browse the repository at this point in the history
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: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
  • Loading branch information
mutdmour and netroy authored Nov 4, 2022
1 parent 78c024b commit c2c7927
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/editor-ui/src/components/forms/CodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit c2c7927

Please sign in to comment.