Fix codemirror selection color (#16409)

This commit is contained in:
Bram Kragten 2023-05-04 15:13:32 +02:00
parent 9f195534b5
commit 31da0d8678
No known key found for this signature in database
GPG Key ID: FBE2DFDB363EF55B

View File

@ -46,7 +46,6 @@ export const haTheme = EditorView.theme({
color: "var(--primary-text-color)",
backgroundColor:
"var(--code-editor-background-color, var(--mdc-text-field-fill-color, whitesmoke))",
"& ::selection": { backgroundColor: "rgba(var(--rgb-primary-color), 0.3)" },
borderRadius:
"var(--mdc-shape-small, 4px) var(--mdc-shape-small, 4px) 0px 0px",
caretColor: "var(--secondary-text-color)",
@ -54,14 +53,20 @@ export const haTheme = EditorView.theme({
maxHeight: "var(--code-mirror-max-height, unset)",
},
"&.cm-editor.cm-focused": { outline: "none" },
"&.cm-editor.cm-focused": {
outline: "none",
},
"&.cm-focused .cm-cursor": {
borderLeftColor: "var(--secondary-text-color)",
},
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": {
backgroundColor: "rgba(var(--rgb-primary-color), 0.3)",
".cm-selectionBackground, ::selection": {
backgroundColor: "rgba(var(--rgb-primary-color), 0.1)",
},
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
backgroundColor: "rgba(var(--rgb-primary-color), 0.2)",
},
".cm-activeLine": {