fix(eidos listbox): add max-block-size + overflow-y auto

The Listbox container grew unbounded when items overflowed — long lists
just stretched the parent layout. Adds:

- Default `max-block-size: min(60vh, 22rem)` via `--_listbox-max-height`
  token (consumer can override via inline style).
- `overflow-y: auto` + `overscroll-behavior: contain` so the listbox
  becomes its own scroll context.
- Horizontal orientation switches axes: removes the block cap and uses
  `overflow-x: auto` instead so a single-row list never clips.

Verified: with 8 items at md size, container caps at 352px with
scrollHeight 378px — scrollbar present and working.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
active-uix
dev 5 months ago
parent 80b21f63ba
commit 830025b4ad

@ -21,6 +21,7 @@
--_listbox-item-height: var(--control-height-md);
--_listbox-item-px: var(--space-3);
--_listbox-item-font-size: var(--font-size-sm);
--_listbox-max-height: min(60vh, 22rem);
--_listbox-accent: var(--color-primary-solid);
--_listbox-accent-soft: var(--color-primary-element);
--_listbox-accent-text: var(--color-content-on-solid);
@ -37,6 +38,15 @@
font-size: var(--_listbox-item-font-size);
line-height: var(--leading-ui);
outline: none;
/*
* Vertical scroll for tall lists. Default cap is min(60vh, 22rem) —
* generous but bounded. Consumer overrides via inline style
* (e.g. `style="--_listbox-max-height: 40rem;"`) or by wrapping in a
* fixed-height container.
*/
max-block-size: var(--_listbox-max-height);
overflow-y: auto;
overscroll-behavior: contain;
}
[data-listbox][data-block] {
@ -48,6 +58,10 @@
flex-direction: row;
flex-wrap: wrap;
align-items: center;
/* Single row across the viewport — scroll inline, not block. */
max-block-size: none;
overflow-y: visible;
overflow-x: auto;
}
/* ── Variant — surface (default) ─ */

Loading…
Cancel
Save

Powered by TurnKey Linux.