Skip to content
Cortex

CSS Variables

Customize Cortex surfaces through documented semantic and component CSS variables.

1 min readEdit on GitHub

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-*: the warm Stone neutrals Paper is built on
  • --mist-*: the previous cool neutral scale, kept for community themes
  • --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#

css
--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
css
--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#

css
--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#

css
--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--settings-group-radius--settings-row-height--settings-row-inset--settings-row-inset-icon--settings-row-icon--tab-bg--tab-active-bg--tab-accent--statusbar-bg--statusbar-border--scrollbar-thumb--scrollbar-hover--shadow-raised--shadow-floating--shadow-floating-pill--shadow-primary--shadow-overlay--surface-raised--surface-raised-hover--hairline--fill-quiet--fill-quiet-strong--fill-selected--button-height-xs--button-height-sm--button-height-md--button-height-lg--control-height-sm--control-height-md--control-height-lg--input-height-md--row-height--row-radius--workspace-card-radius--workspace-card-shadow--titlebar-height--radius

Status Colors#

css
--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#

css
--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-inline-code-color--markdown-link-mark-color--markdown-highlight-color--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#

css
--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

Search docs

Search Cortex documentation pages and headings.