Block library proposal: inverse section scope agreed with design tokens
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c7e2d237e7
commit
0eeb7cd280
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user