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:
parent
fdeb95a61b
commit
9fdde2ec63
1 changed files with 135 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue