Add dark mode support for the editor.

This commit is contained in:
Tom Alexander 2024-01-28 19:09:41 -05:00
parent 8c2c48a719
commit ff3618b67d
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -1,6 +1,19 @@
.EditorTextWrapper {
--editor-background-color: #000000;
--editor-font-color: #ffffff;
--editor-highlight-color: #0000ff;
}
@media (prefers-color-scheme: light) {
.EditorTextWrapper {
--editor-background-color: #ffffff;
--editor-font-color: #000000;
--editor-highlight-color: #ffff00;
}
}
.EditorTextWrapper { .EditorTextWrapper {
position: relative; position: relative;
background: white; background: var(--editor-background-color);
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas,
"DejaVu Sans Mono", monospace; "DejaVu Sans Mono", monospace;
font-weight: normal; font-weight: normal;
@ -10,6 +23,7 @@
.EditorTextArea, .EditorTextArea,
.EditorUnderlay { .EditorUnderlay {
color: var(--editor-font-color);
font-family: inherit; font-family: inherit;
font-weight: inherit; font-weight: inherit;
font-size: inherit; font-size: inherit;
@ -44,6 +58,6 @@
overflow-y: scroll; overflow-y: scroll;
.EditorHighlighted { .EditorHighlighted {
background: #ffff00; background: var(--editor-highlight-color);
} }
} }