added dark mode and margin changes

This commit is contained in:
David Meincke
2022-03-22 22:14:38 +01:00
parent 31722d4bf4
commit f25f3daf7f
8 changed files with 92 additions and 15 deletions
@@ -13,6 +13,7 @@ export class CodeEditor extends BaseElement {
this.initWorkers();
const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)");
var editor = monaco.editor.create(this, {
value: this.input,
@@ -22,7 +23,8 @@ export class CodeEditor extends BaseElement {
minimap: {
enabled: false
},
autoIndent: "full"
autoIndent: "full",
theme: prefersDarkScheme.matches ? 'vs-dark' : 'vs-white'
});
monaco.languages.registerCompletionItemProvider("javascript", {