Skip to content

Commit 79ef52d

Browse files
authored
Fix dark mode selection highlighting (#1150)
- Fixed the selector specificity for selected text in the editor - Toned down the match highlighting ### Before ![Screenshot 2024-12-05 at 14 31 10](https://github.com/user-attachments/assets/3a9fef84-8c1a-4884-a36e-9aae03fcf897) ### After ![Screenshot 2024-12-05 at 14 19 57](https://github.com/user-attachments/assets/c25aa412-8feb-4737-8295-05c7c2b6a8bd)
1 parent 368db16 commit 79ef52d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## Unreleased
88

9+
### Fixed
10+
11+
- Selected text background colour contrast in editor dark mode (#1150)
12+
13+
### Changed
14+
15+
- Toned down the match highlighting colour in editor dark mode (#1150)
16+
917
## [0.28.11] - 2024-12-03
1018

1119
### Fixed

src/assets/themes/editorDarkTheme.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ export const editorDarkTheme = EditorView.theme(
1717
"background-color": "inherit",
1818
color: "inherit",
1919
},
20-
"&.cm-focused .cm-selectionBackground, ::selection": {
21-
background: "#144866",
20+
"&.cm-focused.ͼ3 .cm-selectionLayer .cm-selectionBackground": {
21+
backgroundColor: "#144866",
22+
},
23+
".cm-selectionMatch": {
24+
backgroundColor: "rgba(153, 255, 119, 0.2)",
2225
},
2326
"&.cm-focused .cm-cursor": {
2427
borderLeftColor: "white",

0 commit comments

Comments
 (0)