floating-ui's numeric `sideOffset` can't take a token, so the trigger->panel gap was a hardcoded per-component number (0/4/6/8, inconsistent). Canonize it: register a `--floating-gap` <length> @property, set it per archetype via a foundation rule (`--floating-gap-menu: 0`, `--floating-gap-panel: --space-1-5`), and have the shared positioner (soma FloatingContent) read the resolved px off the content and feed it as the offset -- token-driven (follows density x scaling) and arrow-safe (the arrow rides with the offset). A content opts in by stamping `data-floating-gap`; otherwise the positioner falls back to its numeric `sideOffset`, so the rest migrates one at a time. Pilot: Popover.Content stamps `data-floating-gap="panel"`. Verified in-browser: overriding `--floating-gap-panel` to 20px moves the popover gap to 18px (20 minus the popover's ~2px border overlap); the default 6px is a no-op vs the old sideOffset=6. check 0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>active-uix
parent
7cf30287de
commit
1590684c2e
Loading…
Reference in new issue