web/elements: improve contrast for codemirror backgrounds

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-07-08 22:55:57 +02:00
parent 47434cd62d
commit 2432e51970

View file

@ -85,8 +85,22 @@ export class CodeMirrorTextarea extends LitElement {
constructor() { constructor() {
super(); super();
this.theme = new Compartment(); this.theme = new Compartment();
this.themeLight = EditorView.theme({}, { dark: false }); this.themeLight = EditorView.theme(
this.themeDark = EditorView.theme({}, { dark: true }); {
"&": {
backgroundColor: "var(--pf-global--BackgroundColor--light-300)",
},
},
{ dark: false },
);
this.themeDark = EditorView.theme(
{
"&": {
backgroundColor: "var(--ak-dark-background-light)",
},
},
{ dark: true },
);
} }
private getInnerValue(): string { private getInnerValue(): string {