Merge branch 'main' into claude/reference-site-build

This commit is contained in:
Radosław Smoliński
2026-10-29 15:17:24 +01:00
27 changed files with 258 additions and 103 deletions
+3 -2
View File
@@ -906,7 +906,8 @@ Every site uses the same `--ipal-*` token names and Tailwind utilities; only the
`rounded-card`, `shadow-sm`, `max-w-container`, `duration-fast ease-out`. **Never** hex, `bg-[#…]`, `var(--color-…)`,
or `dark:` for colours (the roles switch with `data-theme` themselves). `dark:` only for non-colour differences.
- **Inverted section:** `<Section>` with `settings.background = inverted` → `bg-inverse` + `data-surface="inverse"`;
content inside keeps `text-fg` / `text-link` (the scope re-maps them).
content inside keeps `text-fg` / `text-link` / `bg-primary` (the scope re-maps them; a dark brand primary needs
`primary-inverse` / `primary-inverse-text` in `tokens.ts` — the contrast report says when; default: the brand primary). `data-theme="dark"` on any element = a dark panel.
- Fonts via `next/font` with `variable: '--font-family-body'` / `'--font-family-heading'` on `<html>` (not
`--font-body`: a `var()` cycle with the `font-body` utility). Max 2 families.
- Values a CSS variable can't reach (`next/og`, e-mail, `theme-color`): `resolveColors(tokens)` from `@/design/tokens`.
@@ -1054,7 +1055,7 @@ project → **plugin gap**, not a copy.
| `next.config` | `buildImagesConfig`, `buildSecurityHeaders` (`csp`), `buildCsp`, `buildCspHeaders`, `buildAdminCsp` / `buildAdminCspHeaders`, `buildUploadSecurityHeaders`, `withSecurityConfig` (hides `X-Powered-By`) | storage.md, security.md |
| CSP reports, nonces | `createCspReportRoute` (`parseCspReports`, type `CspViolation`), `createProxy({ csp })` + `<SiteProviders nonce>` (dynamic pages only), `createCspNonce`, `CSP_NONCE_HEADER`, `buildReportingEndpoints`, `cspHeaderKey`, `DEFAULT_CSP_REPORT_GROUP`; types `BuildAdminCspArgs`, `CspDirective`, `CspSources`, `CreateCspReportRouteArgs`, `WithSecurityConfigOptions` | security.md |
| Fluid typography and spacing | `fluid.css` / `fluid-wide.css` (`--ipal-*` variables); your own sizes: `fluidClamp`, `FLUID_SCALE`, `FLUID_RANGES` | design-tokens.md |
| Brand colours, fonts, radii, motion, dark mode | `tokens.css` + `tailwind.css`, `src/design/tokens.ts` (`defineTokens`, types `TokensInput`, `ColorInput`, `ColorRole`), `pnpm exec ipal-tokens` (`--check`, `--report`, `--warn-only`); building blocks `tokensToCss`, `defaultTokensCss`, `contrastReport` (`ContrastRow`), `contrastRatio`, `parseColor`, `resolveColors`, `IPAL_TOKENS`, `ipalVar`, `IpalTokenName`, `IPAL_BREAKPOINTS`, `COLOR_DEFAULTS`, `STATIC_DEFAULTS`, `FLUID_TOKENS`, `INVERSE_SCOPE`, `LEGACY_DARK_ROLES`, `DARK_SELECTOR`, `INVERSE_SELECTOR`, `RemValue`, `FluidRange` | design-tokens.md |
| Brand colours, fonts, radii, motion, dark mode | `tokens.css` + `tailwind.css`, `src/design/tokens.ts` (`defineTokens`, types `TokensInput`, `ColorInput`, `ColorRole`), `pnpm exec ipal-tokens` (`--check`, `--report`, `--warn-only`); building blocks `tokensToCss`, `defaultTokensCss`, `contrastReport` (`ContrastRow`), `contrastRatio`, `parseColor`, `resolveColors`, `IPAL_TOKENS`, `ipalVar`, `IpalTokenName`, `IPAL_BREAKPOINTS`, `COLOR_DEFAULTS`, `STATIC_DEFAULTS`, `FLUID_TOKENS`, `INVERSE_SCOPE`, `LEGACY_DARK_ROLES`, `LIGHT_SELECTOR`, `DARK_SELECTOR`, `INVERSE_SELECTOR`, `RemValue`, `FluidRange` | design-tokens.md |
| Accessibility widget CSS | `@intecion/ipal-kit/a11y.css` (works through the tokens) | accessibility.md |
**Consent, analytics, operations**