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
8 changed files with 143 additions and 109 deletions

View file

@ -6,7 +6,7 @@
flex: none;
width: 5em;
aspect-ratio: 1;
border-radius: 6px;
border-radius: var(--radius-md);
background-color: color-mix(in srgb, var(--crust) 60%, transparent);
}
.ui-agent-icon > img {

View file

@ -27,5 +27,5 @@
margin: 0;
padding: 0.5em 0.75em;
border: 1px solid var(--red);
border-radius: 4px;
border-radius: var(--radius-sm);
}

View file

@ -10,7 +10,7 @@
margin: 0;
padding: 0.6em 0.8em 0.8em;
border: 1px solid var(--border);
border-radius: 0.5em;
border-radius: var(--radius-md);
}
.ui-context-limits legend {
padding: 0 0.4em;
@ -36,7 +36,7 @@
top: 50%;
height: 0.6em;
transform: translateY(-50%);
border-radius: 0.3em;
border-radius: var(--radius-sm);
background: linear-gradient(
to right,
color-mix(in srgb, var(--muted) 40%, transparent) 0 var(--fresh-at),
@ -72,7 +72,7 @@
width: var(--thumb);
height: 1.6em;
border: 2px solid var(--fg);
border-radius: 0.35em;
border-radius: var(--radius-sm);
background: var(--bg-elev);
cursor: grab;
}
@ -82,7 +82,7 @@
width: var(--thumb);
height: 1.6em;
border: 2px solid var(--fg);
border-radius: 0.35em;
border-radius: var(--radius-sm);
background: var(--bg-elev);
cursor: grab;
}

View file

@ -16,7 +16,7 @@
gap: 0.35em;
padding: 0.7em 0.5em 0.6em;
border: 1px solid var(--border);
border-radius: 0.5em;
border-radius: var(--radius-md);
background: var(--bg);
cursor: pointer;
}

View file

@ -35,7 +35,7 @@
gap: 0.25em;
padding: 0.25em 0.25em 0.25em 1.1em;
border: 1px solid var(--purple-dim);
border-radius: 999px;
border-radius: var(--radius-pill);
/* Frosted glass, the recipe of the badges (`Badge.css`): translucent over a
blur, so the rows scroll behind it. Dark only, as there: on a light page
the busy content behind would wash the text out, so light keeps the solid
@ -116,7 +116,7 @@
gap: 0.75em;
padding: 0.25em 0.25em 0.25em 1.1em;
border: 1px solid var(--red);
border-radius: 999px;
border-radius: var(--radius-pill);
background: color-mix(in srgb, var(--red) 14%, var(--bg-elev));
box-shadow:
0 0.3em 1em rgba(0, 0, 0, 0.45),
@ -134,7 +134,7 @@
height: 2.5em;
padding: 0 1.1em;
border: 0;
border-radius: 999px;
border-radius: var(--radius-pill);
background: var(--red);
color: var(--crust, var(--bg));
font: inherit;

View file

@ -4,13 +4,13 @@
position: absolute;
inset-inline: 0;
bottom: calc(100% + 0.4em);
z-index: 20;
z-index: var(--z-popover);
overflow: hidden;
border: 1px solid var(--border);
border-radius: 0.5em;
border-radius: var(--radius-md);
background: var(--bg-elev);
box-shadow:
0 0.4em 1.2em rgba(0, 0, 0, 0.45),
var(--shadow-pop),
0 0 0 1px color-mix(in srgb, var(--purple) 18%, transparent);
}
@ -29,7 +29,7 @@
align-items: baseline;
gap: 0.75em;
padding: 0.4em 0.6em;
border-radius: 0.35em;
border-radius: var(--radius-sm);
cursor: pointer;
}
@ -87,6 +87,6 @@
.ui-command-menu-hint kbd {
padding: 0 0.35em;
border: 1px solid var(--border);
border-radius: 0.3em;
border-radius: var(--radius-sm);
font-family: var(--mono, monospace);
}

View file

@ -27,7 +27,7 @@
padding: 0.35em 0.5em;
border: 0;
border-left: 3px solid transparent;
border-radius: 0.35em;
border-radius: var(--radius-sm);
background: none;
color: inherit;
font: inherit;

View file

@ -16,7 +16,7 @@
justify-content: space-between;
gap: 1em;
padding: 0.4em 0.5em;
border-radius: 0.35em;
border-radius: var(--radius-sm);
color: inherit;
text-decoration: none;
}