Customization
Customize forma-css at two levels: per-element custom properties you can override anywhere, and SCSS configuration that decides what gets compiled at all.
Runtime: custom properties
Every element exposes its own tokens, wrapped in light-dark() so a single rule serves both themes. Hover, active and secondary states derive automatically in relative oklch – define primary and secondary, get the rest for free.
:root { --forma-color-primary: oklch(55% 0.2 250); --forma-color-secondary: oklch(70% 0.12 150); } button { --forma-button-border-radius: 0; }
Each level has its own page:
Universal size utilities
The universal size utilities are themselves custom properties in action: .sm, .lg and .xl multiply the base font size per element, so any component scales without new CSS.
<div class="flex-row" style="align-items: center">
<button class="sm">Small</button>
<button>Default</button>
<button class="lg">Large</button>
<button class="xl">Extra large</button>
</div>Build time: _config.scss
scss/_config.scss holds the SCSS variables: typography scale, spacing, border radius, the four state colors (success, danger, info, warning, each with a -dark variant) and the $modules map. Every module is optional – turn off badge, dropdown or nav-tab and that CSS simply is not generated. Only layout/normalize and layout/layout are always compiled.
$modules: ( "content/badge": false, "components/dropdown": true, "components/nav-tab": true, // ... );