swarm-ui: make the shell header sticky and frosted glass

This commit is contained in:
iris 2026-09-13 22:13:07 +02:00
commit cab6910cbb

View file

@ -19,6 +19,11 @@
specificity as the media rule, so source order after it wins), then specificity as the media rule, so source order after it wins), then
`:root[data-motion='allow']` last to re-enable despite an OS-level `:root[data-motion='allow']` last to re-enable despite an OS-level
reduce preference. */ reduce preference. */
/* Sticky + frosted glass (mara: "sticky header bar ... frosted glass")
same `color-mix` + `backdrop-filter` recipe `.terminal-wrap`/
`.ui-badge` (@hive/shared) already use, dark-only same as those (a
light bg behind glass washes out). `z-index` keeps it above
`.shell-body` once content scrolls underneath. */
.shell-header { .shell-header {
display: flex; display: flex;
align-items: center; align-items: center;
@ -26,7 +31,29 @@
gap: 1.5em; gap: 1.5em;
padding: 0.75em 1.25em; padding: 0.75em 1.25em;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
-webkit-backdrop-filter: blur(8px) saturate(120%);
backdrop-filter: blur(8px) saturate(120%);
position: sticky;
top: 0;
z-index: 10;
}
@media (prefers-color-scheme: light) {
.shell-header {
background: var(--bg-elev);
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
}
:root[data-theme="light"] .shell-header {
background: var(--bg-elev); background: var(--bg-elev);
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
:root[data-theme="dark"] .shell-header {
background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
-webkit-backdrop-filter: blur(8px) saturate(120%);
backdrop-filter: blur(8px) saturate(120%);
} }
.shell-brand { .shell-brand {
font-weight: 600; font-weight: 600;