CSS tokens

These are the CSS custom properties moss defines. Override any of them in .moss/theme/style.css — no !important needed.

The full size scale runs --moss-size-{2xs,xs,sm,md,lg,xl,2xl,3xl}.

CategoryVariableDefaultDescription
code--moss-code-accent-primary#2d5a2dCode accent primary — moss green, systems/primary languages. Dark: color-mix lightened (fallback #6a9a5a).
code--moss-code-accent-quaternary#6b5b4fCode accent quaternary — deeper brown, config/data
code--moss-code-accent-secondary#5d5853Code accent secondary — warm gray, web languages
code--moss-code-accent-tertiary#8a8580Code accent tertiary — muted brown, scripting
code--moss-code-background#f8f6f3Code block background
code--moss-code-border#e0ddd6Code block border
color--moss-border-light#e6e2dbLight border color
color--moss-border-medium#d1cdc4Medium border color
color--moss-color-accent#2d5a2dLinks, highlights, accent elements
color--moss-color-accent-hovercolor-mix(in oklch, var(--moss-color-accent) 85%, black)Accent color on hover — auto-derived from --moss-color-accent. Light: darkens accent by mixing 85% accent + 15% black (hover = press-down cue). Dark: lightens accent by mixing 80% accent + 20% white (hover = surface lift). Override only if the mix produces a wrong result for a custom palette.
color--moss-color-accent-quietrgba(45, 90, 45, 0.28)Quiet accent for ambient indicators (hairlines, tree-row left-borders). ~28% opacity of moss-color-accent. Consumed by the breadcrumb and preview hairlines (ADR-015 Ambient renderer).
color--moss-color-bg#faf8f5Page background
color--moss-color-muted#8a8580Secondary/muted text
color--moss-color-surface#f4f1ecCard and surface background
color--moss-color-text#2c2825Primary text
color--moss-color-text-secondary#5d5853Secondary text color — darker than --moss-color-muted, used for readable secondary content (nav links, dates, excerpts). Renamed from --moss-text-secondary in v1.3.
color--moss-color-ui-accentvar(--moss-color-accent)Accent for navigation, buttons, and site controls (chrome). Defaults to the content accent; set to a neutral (e.g. var(--moss-color-text)) for quiet chrome.
layout--moss-container-paddingclamp(1rem, 5vw, 2rem)Container side padding
layout--moss-content-widthcalc(42 * var(--moss-reading-size))Maximum content width. Font-stable: a multiple of --moss-reading-size (a length), NOT a ch value, so text, inline images, and figures resolve to the same column at any element font-size (a ch measure drifts per-element and desyncs text from figures when a theme changes the prose font). 42 ≈ the prior 67ch for the default font; tracks the scale-* presets via --moss-reading-size.
layout--moss-content-width-sidebarcalc(39 * var(--moss-reading-size))Content width when sidebar is active. Font-stable multiple of --moss-reading-size (≈ prior 62ch); see moss-content-width.
layout--moss-sidebar-width280pxSidebar width
layout--moss-site-max-width1200pxMaximum overall site width
spacing--moss-space-2xl4remDouble extra large (64px)
spacing--moss-space-lg2remLarge (32px)
spacing--moss-space-md1.5remMedium (24px)
spacing--moss-space-sm1remSmall (16px)
spacing--moss-space-xl3remExtra large (48px)
spacing--moss-space-xs0.5remExtra small (8px)
syntax--moss-hl-addition-bgrgba(74, 106, 42, 0.1)Diff addition background. Note: dark value only appears in data-theme=dark block in site.css; @media prefers-color-scheme:dark block omits it (pre-existing gap, not introduced here).
syntax--moss-hl-attr#5a6a4aSyntax: attribute
syntax--moss-hl-builtin#2d5a2dSyntax: builtin
syntax--moss-hl-comment#9a9080Syntax: comment
syntax--moss-hl-deletion#8a4a3aSyntax: deletion
syntax--moss-hl-deletion-bgrgba(138, 74, 58, 0.1)Diff deletion background. Note: dark value only appears in data-theme=dark block in site.css; @media prefers-color-scheme:dark block omits it (pre-existing gap, not introduced here).
syntax--moss-hl-function#3a5a6aSyntax: function
syntax--moss-hl-keyword#7a5834Syntax: keyword (also used for tags — intentionally shared)
syntax--moss-hl-meta#8a7a6aSyntax: meta
syntax--moss-hl-number#6b5b8aSyntax: number
syntax--moss-hl-operator#5d5853Syntax: operator
syntax--moss-hl-string#4a6a2aSyntax: string
syntax--moss-hl-tag#7a5834Syntax: tag (same value as moss-hl-keyword — intentionally shared)
syntax--moss-hl-type#8a5a3aSyntax: type
typography--moss-font-body-apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'WenQuanYi Micro Hei', sans-serifBody text font stack
typography--moss-font-heading'Iowan Old Style', Athelas, 'Palatino Linotype', Palatino, 'Book Antiqua', 'Songti SC', 'Songti TC', 'STSongti', 'Noto Serif CJK SC', 'Source Han Serif SC', 'NSimSun', 'SimSun', serifHeading font stack: serif by default for editorial weight
typography--moss-font-heading-weight480Heading font weight. Source: h1-h6 rule in site.css (font-weight: 480).
typography--moss-font-monoui-monospace, 'Cascadia Code', 'SF Mono', SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', 'Courier New', monospaceMonospace stack for code
typography--moss-font-weight-body320Default body font weight (renamed from --moss-font-weight in v1.3)
typography--moss-reading-sizevar(--moss-reading-size-base)Effective reading text size; defaults to --moss-reading-size-base and is adjusted by the reader font-scale control.
typography--moss-reading-size-base1.125remBody / reading text size. Headings use the --moss-size-lg/-xl/-2xl scale and are unaffected by this token.
typography--moss-size-2xl1.625rem26px
typography--moss-size-2xs0.75rem12px — metadata, captions, chip labels
typography--moss-size-3xl2rem32px
typography--moss-size-lg1.25rem20px
typography--moss-size-mdvar(--moss-reading-size-base)18px reading size — matches --moss-reading-size-base, the body/reading text size
typography--moss-size-sm1rem16px
typography--moss-size-xl1.375rem22px
typography--moss-size-xs0.875rem14px

Run moss describe --json for the live token list of your installed moss.

Published with moss