1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-20 15:09:03 +01:00

Fix codemirror selection color (#16409)

This commit is contained in:
Bram Kragten
2023-05-04 15:13:32 +02:00
committed by GitHub
parent 79d6453c7e
commit ed19cfeaaa
+9 -4
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": {