Add the light-mode to CodeMirror editor.
Change-Id: I866359f37f425af13612e9fdb60a669f74b05616
diff --git a/web/element/extensions.ts b/web/element/extensions.ts
index 58a0f23..ea18ffc 100644
--- a/web/element/extensions.ts
+++ b/web/element/extensions.ts
@@ -36,6 +36,12 @@
import {language} from './language';
import {EditPreferencesInfo} from './codemirror-element';
+const oneLight = () =>
+ EditorView.theme({
+ '&': {background: 'white'},
+ '.cm-lineNumbers': {'background-color': '#f1f3f4'},
+ });
+
const trailingspace = () =>
EditorView.theme({
'.cm-trailingspace': {
@@ -117,6 +123,7 @@
trailingspace(),
tabsOrSpaces(),
fixedHeightEditor(height),
+ oneLight(),
];
if (!prefs) return codeExtensions;