From 0eeb7cd280d17fd2213412cdd513a7a76bc40712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Smoli=C5=84ski?= Date: Thu, 29 Oct 2026 13:30:16 +0100 Subject: [PATCH] Block library proposal: inverse section scope agreed with design tokens Co-Authored-By: Claude Opus 5.5 --- docs/dev/block-library-proposal.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/dev/block-library-proposal.md b/docs/dev/block-library-proposal.md index 105aa8f..dab7548 100644 --- a/docs/dev/block-library-proposal.md +++ b/docs/dev/block-library-proposal.md @@ -279,10 +279,12 @@ Colours switch under `html[data-theme=dark]`, so blocks never use `dark:` for co | Motion | `duration-fast/base/slow`, `ease-out` (0 ms under reduced motion) | | Layering | `z-overlay` (lightbox is already the plugin's) | -**Inverted sections.** Links, borders and the focus ring inside `bg-inverse` must stay readable. -Requested from the tokens track: `Section` sets `data-surface="inverse"` and the preset re-maps -`--ipal-text`, `--ipal-text-strong`, `--ipal-text-muted`, `--ipal-link`, `--ipal-border` and `--ipal-focus` -inside it, so cards, links and rich text need no inverse variants. Open until that session confirms. +**Inverted sections** (agreed with the tokens track). `Section` renders `bg-inverse` with +`data-surface="inverse"`. Inside that scope the preset re-maps the text, muted-text, border, surface and +hover tokens, plus link (`--ipal-link-inverse`) and focus (`--ipal-focus-inverse`), and flips `color-scheme`. +Blocks inside use plain `text-fg`, `text-link`, `border-border` and need no inverse variants. Primary and accent are not re-mapped; the +tokens contrast report warns when primary on `surface-inverse` fails. `data-surface="muted"` is set on +muted sections as a hook and re-maps nothing by default. If the owner picks shadcn-style utility names instead (`text-foreground`, `bg-muted`), the blocks change by a mechanical class rename; the roles stay.