Ten atomic token lists plus two composite preset lists, stored as one option and emitted as CSS custom properties.
Shape#
interface DesignToken {
id: string; name: string; value: string;
tabletValue?: string; mobileValue?: string;
}
interface DesignSystem {
colors: DesignToken[]; fontFamilies: DesignToken[];
fontSizes: DesignToken[]; lineHeights: DesignToken[];
letterSpacing: DesignToken[]; borderRadius: DesignToken[];
boxShadows: DesignToken[]; spacing: DesignToken[];
containerWidths: DesignToken[]; opacity: DesignToken[];
typography: TypographyPreset[];
buttons: ButtonPreset[];
}Category map#
TokenCategory (link key) | Storage key | CSS variable prefix |
|---|---|---|
color | colors | --jalpi-color- |
fontFamily | fontFamilies | --jalpi-font- |
fontSize | fontSizes | --jalpi-fs- |
lineHeight | lineHeights | --jalpi-lh- |
letterSpacing | letterSpacing | --jalpi-ls- |
borderRadius | borderRadius | --jalpi-radius- |
boxShadow | boxShadows | --jalpi-shadow- |
spacing | spacing | --jalpi-space- |
containerWidth | containerWidths | --jalpi-container- |
opacity | opacity | --jalpi-opacity- |
The TypeScript TokenCategory union uses the storage keys; Jalpi_Settings::TOKEN_CATEGORIES maps the short link keys to them. globalStyleRef.tokens[prop].category is validated against that map.
Composite presets#
interface TypographyPreset {
id, name, fontFamily?, fontSize?, fontWeight?,
lineHeight?, letterSpacing?, textTransform?, color?
}
interface ButtonPreset {
id, name, backgroundColor?, color?, borderRadius?,
paddingTop?, paddingBottom?, paddingLeft?, paddingRight?,
fontSize?, fontWeight?, fontFamily?, border?, boxShadow?, textTransform?
}Linking expands to var(--jalpi-typo-{presetId}-{kebab-prop}, {literal}) or var(--jalpi-btn-{presetId}-β¦).
CSS output#
:root {
--jalpi-color-primary: #6366f1;
--jalpi-fs-base: 16px;
--jalpi-space-lg: 32px;
}
@media (max-width: 1024px) { :root { --jalpi-fs-base: 15px; } }
@media (max-width: 767px) { :root { --jalpi-fs-base: 14px; } }Emitted by Jalpi_Settings::output_design_system_css() and filterable through jalpi_design_system_css_vars.
Last updated: November 2026