Skip to content

Commit 8ef8769

Browse files
authored
chore: reset selection color in editor (#280)
* chore: reset selection color in editor * chore: background-color for dark mode in editor
1 parent f6f184e commit 8ef8769

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/routes/tutorial/[slug]/codemirror.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
height: 100%;
77
}
88

9+
.cm-editor ::selection {
10+
color: revert;
11+
}
12+
913
.cm-editor .cm-scroller {
1014
font-family: var(--font-mono);
1115
font-size: 1.3rem;
@@ -80,7 +84,7 @@
8084
}
8185

8286
.cm-editor .cm-activeLine {
83-
background-color: var(--sk-back-2);
87+
background-color: hsl(0, 0%, 40%, 0.2);
8488
}
8589

8690
.cm-editor .cm-diagnostic-warning {
@@ -90,4 +94,15 @@
9094
.cm-editor .cm-diagnostic-warning {
9195
background: hsl(39, 100%, 10%);
9296
}
97+
98+
.cm-editor.cm-focused .cm-selectionBackground,
99+
.cm-editor .cm-selectionBackground,
100+
.cm-editor .cm-content ::selection {
101+
background: var(--sk-theme-3);
102+
opacity: .3;
103+
}
104+
105+
.cm-editor .cm-selectionMatch {
106+
background: rgba(255, 255, 255, 0.2);
107+
}
93108
}

0 commit comments

Comments
 (0)