Watch
0
0
Fork
You've already forked hyperhive
0

frontend: one scale for z-index, corner radius and the floating-box shadow

z-index ran through eleven values (1 to 1100), border-radius through about
twenty and floating boxes had six different shadows, with no names, so each new
box picked its own. theme.css now defines --z-bar, --z-popover, --z-skip,
--z-modal, --z-toast, --radius-sm, --radius-md, --radius-pill and --shadow-pop,
and every stylesheet and the toast host use them. Corners and shadows move by
a pixel or two at most; the stacking order is unchanged. css-vars.md lists them.
This commit is contained in:
iris 2026-11-25 21:29:08 +01:00
commit c205c6115b

View file

@ -23,11 +23,11 @@
position: absolute;
right: 0;
top: calc(100% + 2px);
z-index: 50;
z-index: var(--z-popover);
background: var(--bg-elev);
border: 1px solid var(--purple-dim);
border-radius: 6px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
border-radius: var(--radius-md);
box-shadow: var(--shadow-pop);
min-width: 10em;
white-space: nowrap;
}
@ -43,7 +43,7 @@
line-height: 1;
cursor: pointer;
padding: 0.1em 0.4em;
border-radius: 4px;
border-radius: var(--radius-sm);
opacity: var(--menu-btn-opacity, 0);
transition:
opacity 120ms,