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

@ -19,7 +19,10 @@
border-radius: var(--radius-md);
background: var(--bg-elev);
box-shadow: var(--shadow-pop);
animation: header-menu-enter 140ms ease;
/* Mount-triggered, not a state transition: the popover only exists in the DOM
while open, so a keyframe on entry is the right tool. `--enter` is the
shared one, with its motion guard (`theme.css`). */
animation: var(--enter);
}
/* A long list, such as the firing alerts: wide, and it scrolls. */
.header-menu-wide {
@ -28,29 +31,6 @@
max-height: 70vh;
overflow-y: auto;
}
/* Mount-triggered, not a state transition: the popover only exists in the DOM
while open, so a keyframe on entry is the right tool. */
@keyframes header-menu-enter {
from {
opacity: 0;
transform: translateY(-0.25em) scale(0.98);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion: reduce) {
.header-menu-popover {
animation: none;
}
}
:root[data-motion="reduce"] .header-menu-popover {
animation: none;
}
:root[data-motion="allow"] .header-menu-popover {
animation: header-menu-enter 140ms ease;
}
/* A row that is a link or a button. */
.header-menu-item {
display: flex;