Autocomplete

Theming

Restyle the menus and syntax colors with CSS variables.

comarkTheme is a CodeMirror base theme: your themes win. Every color is a CSS variable with a light and a dark value (the dark ones apply when the editor has a dark theme, such as @codemirror/theme-one-dark).

.cm-editor {
  --cme-accent: #e11d48;
  --cme-menu-bg: #fffdf7;
  --cme-component: #7c3aed;
}
VariableUsed for
--cme-menu-bg, --cme-menu-fg, --cme-menu-mutedmenu and docs panel
--cme-menu-border, --cme-menu-shadow, --cme-menu-selected, --cme-menu-headermenu chrome
--cme-accentmatched text, chevrons, links
--cme-code-bgcode in the docs panel
--cme-monolabel and example font
--cme-mark, --cme-component, --cme-attr, --cme-value, --cme-class, --cme-binding, --cme-meta, --cme-math, --cme-slotsyntax colors

Classes

  • Syntax: cm-comark-mark, -component, -attr, -value, -class, -id, -binding, -meta, -math, -slot, -alert (from comarkHighlightStyle; standard highlight tags are set too, so any CodeMirror theme colors Comark).
  • Menu: cm-completionIcon-<type> (component, prop, prop-bound, slot, value, binding-root, binding-key, binding-leaf, …), cm-comark-section (breadcrumb), cm-comark-crumb, cm-comark-chevron, cm-comark-glyph, cm-comark-swatch.
  • Docs panel: cm-comark-info, -info-title, -info-rows, -info-value, cm-comark-example.

Set theme: false to style everything yourself.

Copyright © 2026