orgTheme.js (881B)
1 import { EditorView } from '@codemirror/view'; 2 3 export const orgTheme = EditorView.theme({ 4 '&': { 5 height: '100%', 6 fontSize: '0.9rem', 7 fontFamily: 'var(--font-mono)', 8 backgroundColor: 'var(--paper)', 9 }, 10 '.cm-scroller': { 11 overflow: 'auto', 12 fontFamily: 'inherit', 13 }, 14 '.cm-content': { 15 caretColor: 'var(--accent-hover)', 16 padding: '0.75rem 0.5rem', 17 minHeight: '100%', 18 }, 19 '.cm-gutters': { 20 backgroundColor: 'var(--snow)', 21 borderRight: '1px solid var(--border-soft)', 22 color: 'var(--text-muted)', 23 }, 24 '.cm-activeLine': { 25 backgroundColor: 'rgba(122, 155, 184, 0.08)', 26 }, 27 '.cm-cursor': { 28 borderLeftColor: 'var(--accent-hover)', 29 }, 30 '&.cm-focused .cm-selectionBackground, .cm-selectionBackground': { 31 backgroundColor: 'rgba(122, 155, 184, 0.2) !important', 32 }, 33 '.cm-line': { 34 lineHeight: '1.55', 35 }, 36 });