Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: menus, popovers, toasts and dialogs fade in, with one motion guard

Dialogs, toasts, popovers, dropdowns and the filter popover appeared with no
transition, and the header menu had a keyframe of its own. theme.css holds
--enter and --fade, off under reduced motion and the motion setting's reduce,
and each floating box uses them.
This commit is contained in:
iris 2026-11-28 02:35:32 +01:00 • committed by mara
commit 9fdde2ec63

View file

@ -120,6 +120,13 @@ stylesheet names a role and never a number:
Stacking inside one component (1 or 2) stays a plain number. A new floating box
uses `--z-popover` and `--shadow-pop`.
## Entrance motion
A box that floats over the page (a menu, a popover, a toast, a dialog) fades in and drops 4px into place when it opens, and a dialog's backdrop fades in.
`theme.css` holds the two animations as variables, `--enter` and `--fade`, each a whole `animation` value, so a rule says `animation: var(--enter)` and writes no keyframe of its own.
Both are `none` under the OS's reduced-motion preference and when the settings menu's motion setting is **reduce**, and back on when it's **allow**.
A new floating box uses them and needs no motion guard of its own.
## Status tones
A badge, a hint, a banner and a toast all take one of five tones, defined in