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:
parent
0876ff4de8
commit
c205c6115b
33 changed files with 143 additions and 109 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@
|
|||
margin: 0;
|
||||
padding: 0.5em 0.75em;
|
||||
border: 1px solid var(--red);
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
.create-agent-step-tab {
|
||||
padding: 0.3em 0.7em;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--bg);
|
||||
color: var(--muted);
|
||||
font: inherit;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
gap: 0.4em;
|
||||
padding: 0.2em 0.6em;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--bg);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
.agents-selection-bar {
|
||||
position: sticky;
|
||||
bottom: 0.75em;
|
||||
z-index: 5;
|
||||
z-index: var(--z-bar);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
margin-top: 0.75em;
|
||||
padding: 0.6em 1em;
|
||||
border: 1px solid var(--purple);
|
||||
border-radius: 0.5em;
|
||||
border-radius: var(--radius-md);
|
||||
background: color-mix(in srgb, var(--bg-elev) 92%, var(--purple));
|
||||
box-shadow: 0 0.4em 1.2em color-mix(in srgb, var(--crust) 60%, transparent);
|
||||
animation: agents-selection-bar-in 180ms ease;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
.ui-broadcast-filter {
|
||||
display: inline-flex;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.4em;
|
||||
border-radius: var(--radius-sm);
|
||||
overflow: hidden;
|
||||
}
|
||||
.ui-broadcast-filter button {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
.notify-chip {
|
||||
padding: 0.2em 0.7em;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: 999px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--bg-elev);
|
||||
color: var(--fg);
|
||||
font: inherit;
|
||||
|
|
@ -99,10 +99,10 @@
|
|||
|
||||
.notify-ghost {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
z-index: var(--z-popover);
|
||||
padding: 0.2em 0.6em;
|
||||
border: 1.5px solid var(--fg);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-elev);
|
||||
color: var(--fg);
|
||||
pointer-events: none;
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
user-select: none;
|
||||
overflow: auto;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
margin: 0;
|
||||
padding: 0.6em 0.8em 0.8em;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.notify-inspector legend {
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
margin-bottom: 0.5em;
|
||||
padding: 0.4em 0.6em;
|
||||
border: 1px solid var(--red);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.notify-name {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
gap: 0.6em;
|
||||
padding: 0.75em;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5em;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
.ui-tryout-classification-row {
|
||||
align-items: end;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
padding: 0.5em 0.75em;
|
||||
border: 1px solid var(--yellow);
|
||||
border-left-width: 4px;
|
||||
border-radius: 0.4em;
|
||||
border-radius: var(--radius-sm);
|
||||
background: color-mix(in srgb, var(--yellow) 12%, transparent);
|
||||
}
|
||||
/* The egress card: the swarm-wide allowed domains, one per line. */
|
||||
|
|
@ -45,5 +45,5 @@
|
|||
padding: 0.4em 0.7em;
|
||||
border: 1px solid var(--yellow);
|
||||
border-left-width: 4px;
|
||||
border-radius: 0.4em;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
position: absolute;
|
||||
top: calc(100% + 0.4em);
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
z-index: var(--z-popover);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4em;
|
||||
|
|
@ -34,9 +34,9 @@
|
|||
padding: 0.4em;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5em;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-elev);
|
||||
box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.3);
|
||||
box-shadow: var(--shadow-pop);
|
||||
}
|
||||
.alerts-menu-list {
|
||||
display: flex;
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
gap: 0.1em 0.6em;
|
||||
padding: 0.4em 0.6em;
|
||||
border-left: 3px solid var(--red);
|
||||
border-radius: 0.35em;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.alerts-menu-name {
|
||||
font-weight: 600;
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
align-items: center;
|
||||
min-height: 2.75em;
|
||||
padding: 0.4em 0.6em;
|
||||
border-radius: 0.35em;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.alerts-menu-link:hover {
|
||||
background: var(--bg);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
align-items: center;
|
||||
gap: 0.25em;
|
||||
padding: 0.2em 0.4em 0.2em 0.7em;
|
||||
border-radius: 0.3em;
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
gap: 0.4em;
|
||||
padding: 0.75em 1em;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5em;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-elev);
|
||||
}
|
||||
.ui-badge-popover-help {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
gap: 0.35em;
|
||||
padding: 0.75em 1em;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5em;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-elev);
|
||||
}
|
||||
/* Only an interactive `Card` (has `onClick`) gets pointer/hover
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue