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() {
super();
this.theme = new Compartment();
this.themeLight = EditorView.theme({}, { dark: false });
this.themeDark = EditorView.theme({}, { dark: true });
this.themeLight = EditorView.theme(
{
"&": {
backgroundColor: "var(--pf-global--BackgroundColor--light-300)",
},
},
{ dark: false },
);
this.themeDark = EditorView.theme(
{
"&": {
backgroundColor: "var(--ak-dark-background-light)",
},
},
{ dark: true },
);
}
private getInnerValue(): string {