Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Styling

myst-theme exposes its color palette as CSS custom properties (CSS variables), so you can re-skin the entire interface from a single stylesheet without rebuilding the theme. Most elements also carry semantic CSS classes (e.g. myst-top-nav, myst-admonition-header) that you can target directly.

To explore the tokens interactively, try the Live color picker.

Applying overrides in your own site

Add the declarations you want to override to a stylesheet loaded by your site:

:root {
  --myst-color-info: #3b82f6;
  --myst-color-info-bg: #eff6ff;
  --myst-color-info-text: #2563eb;
  /* ...override only what you need */
}

.dark {
  --myst-color-info: #60a5fa;
  --myst-color-info-bg: #0f172a;
  --myst-color-info-text: #93c5fd;
}

For the full list of available variables and their default values, see theme-colors.css.

Naming conventions

Tokens follow the pattern --myst-color-{concept}-{variant}, with light values in :root and dark values redefined under .dark.[1]

A few rules of thumb:

Known limitations

A few aspects of the UI are intentionally not themable yet:

Footnotes
  1. A few design systems used for inspiration: