Skip to content

Commit 407db53

Browse files
committed
style playground closer to V5 version
1 parent dae3d9b commit 407db53

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/components/CodeMirror.res

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,19 +660,31 @@ let createEditor = (config: editorConfig): editorInstance => {
660660
let lintConf = CM6.Compartment.create()
661661
let hintConf = CM6.Compartment.create()
662662

663+
let lineHeight = "1.5"
664+
let cursorColor = "#dd8c1b"
665+
663666
// Basic extensions
664667
let extensions = [
665668
CM6.Compartment.make(languageConf, (language: CM6.extension)),
666669
CM6.Commands.history(),
667670
CM6.EditorView.theme({
668671
".cm-content": {
669-
"lineHeight": "1.5",
672+
"lineHeight": lineHeight,
673+
"caretColor": cursorColor,
670674
},
671675
".cm-line": {
672-
"lineHeight": "1.5",
676+
"lineHeight": lineHeight,
677+
},
678+
".cm-cursor, .cm-dropCursor": {"borderLeftColor": cursorColor},
679+
".cm-activeLine": {
680+
"backgroundColor": "rgba(255, 255, 255, 0.02)",
673681
},
674682
".cm-gutters": {"backgroundColor": "inherit"},
675683
".cm-gutters.cm-gutters-before": {"border": "none"},
684+
".cm-activeLineGutter": {
685+
"color": "#cdcdd6",
686+
"backgroundColor": "inherit",
687+
},
676688
}),
677689
CM6.EditorView.drawSelection(),
678690
CM6.EditorView.dropCursor(),

0 commit comments

Comments
 (0)