Expand description
Canonical design-token conventions (spec/TOKENS.md), shared with the
TypeScript DOM client: the Rust renderer consumes these tables directly, and
pathland-ts-codegen emits the TS equivalents from them — so the
--pl-* naming, the dark. scheme prefix, the generative space.<N>
family, and the length-token rules cannot drift between the renderers.
Constants§
- DARK_
PREFIX - The scheme prefix stripped when naming a CSS variable (
dark.color.primaryoverrides the same--pl-color-primaryinside a dark media query). - FORCED_
DARK_ VAR_ PREFIX - Prefix for the explicit dark-value variable family. Every canonical token
also exposes its dark-layer value at
--pl-dark-<path>regardless of the active scheme, so adark.-prefixed reference can force the dark value (spec/TOKENS.md). - LENGTH_
ELEVATION_ SUFFIXES elevation.<low|high>.<component>: these suffixes are lengths.- LENGTH_
EXACT - Exact-length token paths.
- LENGTH_
PREFIXES - Token paths whose F32 values are CSS lengths (emitted with
px): the value renders with apxsuffix when it matches any of these leading prefixes. - LENGTH_
PREFIX_ SUFFIX - Prefix/suffix length rules: a path matching
prefix…suffixis a length. - SPACE_
FAMILY - The generative spacing family:
space.<N>resolves tocalc(var(--pl-space-base) * N). - VAR_
NAME_ PRESERVED - Characters preserved verbatim in a CSS variable name; every other character
maps to
-. (ASCII alphanumerics plus-and_.) - VAR_
PREFIX - The CSS custom-property prefix for every token variable.