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

@ -25,6 +25,22 @@
--purple: var(--base0E); /* accent — active tabs, links, highlights */
--pink: var(--base0F); /* thinking events */
/* Layering: one scale for every page. Local stacking inside a component
(1, 2) stays a plain number. */
--z-bar: 10; /* sticky bars: the header, selection bars */
--z-popover: 20; /* every floating box: menus, dropdowns, popovers, filters */
--z-skip: 100; /* the skip link, above everything but dialogs */
--z-modal: 1000; /* dialogs */
--z-toast: 1100; /* toasts, above dialogs */
/* Corners: small (chips, inputs), medium (boxes, cards), pill. */
--radius-sm: 0.35em;
--radius-md: 0.5em;
--radius-pill: 999px;
/* The shadow of every floating box. */
--shadow-pop: 0 0.3em 1em rgba(0, 0, 0, 0.4);
/* Off-base16 (no exact slot) — derived from base16 so they still track
a swap. Each is pixel-identical to its prior literal under the
default palette: --crust is a darkened bg; --muted / --subtext0 are