@@ -4,86 +4,83 @@ import { HighlightStyle, syntaxHighlighting } from "@codemirror/language"
44import { tags as t } from "@lezer/highlight"
55
66/// The editor theme styles for One Dark using CSS custom properties.
7- export const oneDarkTheme = EditorView . theme (
8- {
9- "&" : {
10- color : "var(--cm-foreground)" ,
11- backgroundColor : "var(--cm-background)" ,
12- } ,
7+ export const oneDarkTheme = EditorView . theme ( {
8+ "&" : {
9+ color : "var(--cm-foreground)" ,
10+ backgroundColor : "var(--cm-background)" ,
11+ } ,
1312
14- ".cm-content" : {
15- caretColor : "var(--cm-cursor)" ,
16- } ,
13+ ".cm-content" : {
14+ caretColor : "var(--cm-cursor)" ,
15+ } ,
1716
18- ".cm-cursor, .cm-dropCursor" : { borderLeftColor : "var(--cm-cursor)" } ,
19- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection" :
20- { backgroundColor : "var(--cm-selection)" } ,
17+ ".cm-cursor, .cm-dropCursor" : { borderLeftColor : "var(--cm-cursor)" } ,
18+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection" :
19+ { backgroundColor : "var(--cm-selection)" } ,
2120
22- ".cm-panels" : {
23- backgroundColor : "var(--cm-background)" ,
24- color : "var(--cm-foreground)" ,
25- } ,
26- ".cm-panels.cm-panels-top" : {
27- borderBottom : "2px solid var(--cm-gutter-border)" ,
28- } ,
29- ".cm-panels.cm-panels-bottom" : {
30- borderTop : "2px solid var(--cm-gutter-border)" ,
31- } ,
21+ ".cm-panels" : {
22+ backgroundColor : "var(--cm-background)" ,
23+ color : "var(--cm-foreground)" ,
24+ } ,
25+ ".cm-panels.cm-panels-top" : {
26+ borderBottom : "2px solid var(--cm-gutter-border)" ,
27+ } ,
28+ ".cm-panels.cm-panels-bottom" : {
29+ borderTop : "2px solid var(--cm-gutter-border)" ,
30+ } ,
3231
33- ".cm-searchMatch" : {
34- backgroundColor : "#72a1ff59" ,
35- outline : "1px solid #457dff" ,
36- } ,
37- ".cm-searchMatch.cm-searchMatch-selected" : {
38- backgroundColor : "#6199ff2f" ,
39- } ,
32+ ".cm-searchMatch" : {
33+ backgroundColor : "#72a1ff59" ,
34+ outline : "1px solid #457dff" ,
35+ } ,
36+ ".cm-searchMatch.cm-searchMatch-selected" : {
37+ backgroundColor : "#6199ff2f" ,
38+ } ,
4039
41- ".cm-activeLine" : { backgroundColor : "rgba(255, 255, 255, 0.05)" } ,
42- ".cm-selectionMatch" : { backgroundColor : "#aafe661a" } ,
40+ ".cm-activeLine" : { backgroundColor : "rgba(255, 255, 255, 0.05)" } ,
41+ ".cm-selectionMatch" : { backgroundColor : "#aafe661a" } ,
4342
44- "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket" : {
45- backgroundColor : "#bad0f847" ,
46- } ,
43+ "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket" : {
44+ backgroundColor : "#bad0f847" ,
45+ } ,
4746
48- ".cm-gutters" : {
49- backgroundColor : "var(--cm-gutter-background)" ,
50- color : "var(--cm-line-number)" ,
51- border : "none" ,
52- borderRight : "1px solid var(--cm-gutter-border)" ,
53- } ,
47+ ".cm-gutters" : {
48+ backgroundColor : "var(--cm-gutter-background)" ,
49+ color : "var(--cm-line-number)" ,
50+ border : "none" ,
51+ borderRight : "1px solid var(--cm-gutter-border)" ,
52+ } ,
5453
55- ".cm-activeLineGutter" : {
56- backgroundColor : "var(--cm-gutter-background)" ,
57- } ,
54+ ".cm-activeLineGutter" : {
55+ backgroundColor : "var(--cm-gutter-background)" ,
56+ } ,
5857
59- ".cm-foldPlaceholder" : {
60- backgroundColor : "transparent" ,
61- border : "none" ,
62- color : "#ddd" ,
63- } ,
58+ ".cm-foldPlaceholder" : {
59+ backgroundColor : "transparent" ,
60+ border : "none" ,
61+ color : "#ddd" ,
62+ } ,
6463
65- ".cm-tooltip" : {
66- border : "none" ,
67- backgroundColor : "var(--cm-hints-background)" ,
68- color : "var(--cm-hints-foreground)" ,
69- } ,
70- ".cm-tooltip .cm-tooltip-arrow:before" : {
71- borderTopColor : "transparent" ,
72- borderBottomColor : "transparent" ,
73- } ,
74- ".cm-tooltip .cm-tooltip-arrow:after" : {
75- borderTopColor : "var(--cm-hints-background)" ,
76- borderBottomColor : "var(--cm-hints-background)" ,
77- } ,
78- ".cm-tooltip-autocomplete" : {
79- "& > ul > li[aria-selected]" : {
80- backgroundColor : "var(--cm-hints-active-background)" ,
81- color : "var(--cm-hints-active-foreground)" ,
82- } ,
64+ ".cm-tooltip" : {
65+ border : "none" ,
66+ backgroundColor : "var(--cm-hints-background)" ,
67+ color : "var(--cm-hints-foreground)" ,
68+ } ,
69+ ".cm-tooltip .cm-tooltip-arrow:before" : {
70+ borderTopColor : "transparent" ,
71+ borderBottomColor : "transparent" ,
72+ } ,
73+ ".cm-tooltip .cm-tooltip-arrow:after" : {
74+ borderTopColor : "var(--cm-hints-background)" ,
75+ borderBottomColor : "var(--cm-hints-background)" ,
76+ } ,
77+ ".cm-tooltip-autocomplete" : {
78+ "& > ul > li[aria-selected]" : {
79+ backgroundColor : "var(--cm-hints-active-background)" ,
80+ color : "var(--cm-hints-active-foreground)" ,
8381 } ,
8482 } ,
85- { dark : true } ,
86- )
83+ } )
8784
8885/// The highlighting style for code using CSS custom properties.
8986export const oneDarkHighlightStyle = HighlightStyle . define ( [
0 commit comments