pub struct CustomProp {
pub name: &'static str,
pub owner: &'static str,
pub default: &'static str,
pub description: &'static str,
}Expand description
A CSS custom property a theme may set to reconfigure a component.
These are read by moss’s stylesheets as var(--moss-foo, <fallback>) and
are deliberately never declared — that is exactly what makes them opt-in
escape hatches rather than design tokens. A token has a value in :root and
cascades site-wide; one of these has no value until a theme sets it, and it
is set on a component or a scope to change that component.
The distinction matters because it is the whole theming API in practice.
Audited 2026-08-03: the two most heavily customized moss sites (okagaki, 在場)
overrode zero design tokens between them and set six of these. None was
discoverable — not in moss describe --json, not in any published doc — so
okagaki hand-fought the hero height caps that --moss-hero-max-height exists
to lift, across three selectors and a 12-line comment.
Fields§
§name: &'static strProperty name including the leading dashes (e.g. "--moss-hero-max-height").
owner: &'static strClass of the component whose rules read it, or a scope selector when no
single class owns it (e.g. "body"). Free-form: this is documentation,
not a foreign key.
default: &'static strThe fallback moss’s own CSS uses when the theme does not set it.
Taken verbatim from the var() call site — never invented.
description: &'static strWhat setting it does, and when you would want to.