Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/shared/src/header-menu/HeaderMenu.css
iris 9fdde2ec63 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.
2026-11-28 09:46:32 +01:00

48 lines
1.4 KiB
CSS

@import "../icon-button/IconButton.css";
/* <HeaderMenu> — the one popover every header menu (links, user, settings,
alerts) opens. Right-anchored: each trigger sits at the end of a header's
icon cluster, so a left anchor would push it off-screen. */
.header-menu {
position: relative;
display: inline-block;
}
.header-menu-popover {
position: absolute;
top: calc(100% + 0.4em);
right: 0;
z-index: var(--z-popover);
display: flex;
flex-direction: column;
min-width: 12em;
padding: 0.4em;
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: var(--bg-elev);
box-shadow: var(--shadow-pop);
/* 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 {
gap: 0.4em;
width: min(26em, calc(100vw - 2em));
max-height: 70vh;
overflow-y: auto;
}
/* A row that is a link or a button. */
.header-menu-item {
display: flex;
align-items: center;
gap: 0.5em;
min-height: 2.75em;
padding: 0.4em 0.6em;
border-radius: var(--radius-sm);
color: var(--fg);
text-decoration: none;
white-space: nowrap;
}
.header-menu-item:hover {
background: var(--bg);
}