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.
97 lines
2.6 KiB
CSS
97 lines
2.6 KiB
CSS
/* The open agent-terminal tabs in the header's nav row (Shell.tsx). */
|
|
/* Dynamic tabs group — inline in `.shell-nav` itself, next to the
|
|
static route links, not a row of its own under the header.
|
|
`margin-left: 0.5em` + `border-left` reads as "a group
|
|
attached to the nav, not another nav item" without a second landmark
|
|
or a fixed pixel gap that'd fight `.shell-nav`'s own `gap`. */
|
|
.shell-tabs {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 0.5em;
|
|
margin-left: 0.5em;
|
|
padding-left: 0.75em;
|
|
border-left: 1px solid var(--border);
|
|
}
|
|
.shell-tab {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.25em;
|
|
padding: 0.2em 0.4em 0.2em 0.7em;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
}
|
|
.shell-tab-active {
|
|
border-color: var(--pink);
|
|
}
|
|
/* A tab that can be dragged onto a terminal to split it shows a grip in a gutter
|
|
of its own on hover, so the drag is discoverable. The gutter is part of the
|
|
padding, so the tab does not change size when the grip appears. */
|
|
.shell-tab-draggable {
|
|
position: relative;
|
|
padding-left: 1.3em;
|
|
cursor: grab;
|
|
}
|
|
/* The tab a dragged tab would take the place of. */
|
|
.shell-tab-drop {
|
|
box-shadow: inset 2px 0 0 var(--purple);
|
|
}
|
|
.shell-tab-grip {
|
|
position: absolute;
|
|
left: 0.35em;
|
|
top: 50%;
|
|
display: inline-flex;
|
|
color: var(--muted);
|
|
opacity: 0;
|
|
transform: translateY(-50%);
|
|
transition: opacity 0.15s ease;
|
|
pointer-events: none;
|
|
}
|
|
.shell-tab-draggable:hover .shell-tab-grip {
|
|
opacity: 0.9;
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.shell-tab-grip {
|
|
transition: none;
|
|
}
|
|
}
|
|
.shell-tab-link {
|
|
color: var(--muted);
|
|
text-decoration: none;
|
|
font-size: 0.9em;
|
|
}
|
|
.shell-tab-active .shell-tab-link {
|
|
color: var(--fg);
|
|
}
|
|
.shell-tab-link:hover {
|
|
color: var(--fg);
|
|
}
|
|
/* Same reset every icon-only chrome button in this codebase uses
|
|
(`Badge`'s own `<button>` case) — a bare `<button>` here isn't routed
|
|
through `Badge` since it's not a status/value pill, just a close
|
|
glyph, so the reset is inlined rather than reaching for a component
|
|
that doesn't fit this shape. */
|
|
.shell-tab-close {
|
|
all: unset;
|
|
cursor: pointer;
|
|
line-height: 1;
|
|
padding: 0.25em 0.45em;
|
|
border-radius: 0.2em;
|
|
color: var(--muted);
|
|
}
|
|
/* `all: unset` drops the browser's focus ring, and so does the tab link's
|
|
own reset, so both draw one. */
|
|
.shell-tab-close:focus-visible,
|
|
.shell-tab-link:focus-visible {
|
|
outline: 2px solid var(--purple);
|
|
outline-offset: 2px;
|
|
}
|
|
.shell-tab-close:hover {
|
|
color: var(--fg);
|
|
background: color-mix(in srgb, var(--fg) 10%, transparent);
|
|
}
|
|
.shell-tab-rename {
|
|
width: 10em;
|
|
font: inherit;
|
|
}
|