@@ -3,7 +3,16 @@ import { HighlightStyle, syntaxHighlighting } from '@codemirror/language'
33import { tags as t } from '@orgajs/cm-lang'
44
55const theme = EditorView . baseTheme ( {
6- '&' : { } ,
6+ '&' : {
7+ height : '100%' ,
8+ } ,
9+ '&:focus' : {
10+ outline : 'none' ,
11+ } ,
12+ '&.cm-editor.cm-focused' : {
13+ outline : 'none' ,
14+ } ,
15+ '.cm-scroller' : { fontFamily : 'inherit' } ,
716 '.hide' : { display : 'none' } ,
817 '.cm-link' : {
918 cursor : 'pointer' ,
@@ -37,7 +46,12 @@ const baseStyle = HighlightStyle.define([
3746 { tag : t . keyword , fontWeight : 'bold' } ,
3847 { tag : t . strong , fontWeight : 'bold' } ,
3948 { tag : t . emphasis , fontStyle : 'italic' } ,
40- // { tag: t.monospace, color: 'blue' }, // TODO: change font?
49+ {
50+ tag : t . monospace ,
51+ borderRadius : '4px' ,
52+ padding : '1px 4px' ,
53+ fontFamily : "'JetBrains Mono', monospace" ,
54+ } ,
4155 { tag : t . strikethrough , textDecoration : 'line-through' } ,
4256 { tag : t . underline , textDecoration : 'underline' } ,
4357] )
@@ -46,7 +60,6 @@ const lightColors = HighlightStyle.define(
4660 [
4761 { tag : t . keyword , color : '#e45649' } ,
4862 { tag : t . comment , color : '#9ca0a4' } ,
49- { tag : t . monospace , color : 'blue' } ,
5063 { tag : t . link , color : 'blue' } ,
5164 { tag : t . processingInstruction , color : '#9ca0a4' } ,
5265 { tag : t . attributeName , color : '#9ca0a4' } ,
@@ -58,7 +71,6 @@ const darkColors = HighlightStyle.define(
5871 [
5972 { tag : t . keyword , color : 'green' } ,
6073 { tag : t . comment , color : 'red' } ,
61- { tag : t . monospace , backgroundColor : 'blue' } ,
6274 { tag : t . link , color : '#5cc9f5' } ,
6375 { tag : t . processingInstruction , color : 'gray' } ,
6476 { tag : t . attributeName , color : 'gray' } ,
0 commit comments