Skip to content

Search docs

Search Cortex documentation pages and headings.

Theme Development

CSS Variables

Customize Cortex surfaces through documented semantic and component CSS variables.

On this page

Community themes customize Cortex by setting CSS variables. The variables below are generated by the built-in theme system and are safe targets for community CSS.

Primitive Scales

Built-in themes expose scale variables for each token key:

  • --stone-* and --mist-*
  • --ink-* and --slate-*
  • --amber-* and --rose-*
  • --amber-d-* and --rose-d-*
  • --red-*
  • --green-*
  • --yellow-*

Community themes do not need to define every primitive scale. Prefer semantic variables first.

App Surfaces

--bg-primary--bg-secondary--bg-tertiary--bg-elevated--bg-hover--bg-active--bg-selected--bg-code--bg-tag--background--foreground--card--card-foreground--popover--popover-foreground
--text-primary--text-secondary--text-muted--text-disabled--text-placeholder--text-on-accent--accent--accent-hover--accent-active--accent-subtle--accent-border--accent-text--brand--brand-hover--brand-active--brand-subtle--brand-border--brand-text--link--link-hover--link-broken--border--border-subtle--border-strong--border-focus--ring

Typography

--font-ui--font-editor--font-mono--ui-font-size--ui-font-weight--ui-line-height--editor-font-size--editor-font-weight--editor-line-height--editor-paragraph-spacing

User appearance settings may override font families and font sizes. Themes should still define weights and line heights.

Components and Chrome

--btn-primary-bg--btn-primary-text--btn-primary-hover--input-bg--input-border--input-focus-ring--menu-bg--menu-border--menu-shadow--menu-hover--modal-bg--modal-border--modal-shadow--tooltip-bg--tooltip-text--sidebar-bg--sidebar-border--sidebar-tree-guide--settings-group-bg--settings-group-border--settings-group-divider--tab-bg--tab-active-bg--tab-accent--statusbar-bg--statusbar-border--scrollbar-thumb--scrollbar-hover--shadow-raised--shadow-floating--shadow-overlay--radius

Status Colors

--status-error--error-bg--status-error-foreground--status-error-border--status-error-on-solid--status-success--success-bg--status-success-foreground--status-success-border--status-success-on-solid--status-warning--warning-bg--status-warning-foreground--status-warning-border--status-warning-on-solid--destructive--destructive-foreground

Editor, Syntax, and Markdown

--syntax-keyword--syntax-string--syntax-comment--syntax-number--syntax-function--syntax-type--syntax-operator--syntax-property--syntax-heading--syntax-meta--editor-selection-bg--editor-search-match-bg--editor-search-match-active-bg--markdown-content-width--markdown-content-gutter--markdown-block-radius--markdown-block-spacing--markdown-code-font-family--markdown-code-font-size--markdown-code-padding-inline--markdown-code-padding-block--markdown-callout-padding-block--markdown-callout-padding-inline-start--markdown-callout-padding-inline-end

Headings and Tags

--heading-font-weight--normal-weight--inline-title-margin-bottom--h1-font-size--h2-font-size--h3-font-size--h4-font-size--h5-font-size--h6-font-size--h1-color--h2-color--h3-color--h4-color--h5-color--h6-color--tag-bg--tag-active-bg--tag-text--tag-active-text--tag-font-size--tag-font-weight--tag-border-radius--tag-padding