Anpassung

Passe forma-css auf zwei Ebenen an: Custom Properties pro Element, die du überall überschreiben kannst, und SCSS-Konfiguration, die entscheidet, was überhaupt kompiliert wird.

Runtime: Custom Properties

Jedes Element legt seine eigenen Tokens offen, verpackt in light-dark(), sodass eine einzige Regel beide Themes bedient. Hover-, Active- und Secondary-Zustände werden automatisch in relativem oklch abgeleitet – definiere primary und secondary, den Rest bekommst du gratis.

:root {  --forma-color-primary: oklch(55% 0.2 250);  --forma-color-secondary: oklch(70% 0.12 150); } button {  --forma-button-border-radius: 0; }

Jede Ebene hat ihre eigene Seite:

Universelle Größen-Utilities

Die universellen Größen-Utilities sind selbst Custom Properties in Aktion: .sm, .lg und .xl multiplizieren die Basis-Schriftgröße pro Element – jede Komponente skaliert ohne neues CSS.

HTML
<div class="flex-row" style="align-items: center">
  <button class="sm">Klein</button>
  <button>Standard</button>
  <button class="lg">Groß</button>
  <button class="xl">Sehr groß</button>
</div>

Build: _config.scss

scss/_config.scss enthält die SCSS-Variablen: Typografie-Skala, Abstände, Border-Radius, die vier Statusfarben (success, danger, info, warning, je mit -dark-Variante) und die $modules-Map. Jedes Modul ist optional – schalte badge, dropdown oder nav-tab aus und dieses CSS wird schlicht nicht erzeugt. Nur layout/normalize und layout/layout werden immer kompiliert.

$modules: (  "content/badge": false,  "components/dropdown": true,  "components/nav-tab": true,  // ... );