Light theme: the terminal and code blocks sat on --crust, a mid grey there, so text was 2:1 to 3:1. They now use --code-bg, which keeps 95% of a light palette's background (58% of the dark one's, as before); scrims and shadows keep --crust. Dark --muted goes from 4.44:1 to 4.72:1 on --bg. The stored theme and motion overrides are set by a blocking boot script in the head (the page allows no inline script), so a light OS no longer paints light before the dark default; a test keeps its keys in step with the shell. color-scheme follows the palette, so native controls and scrollbars match a forced theme. Five infinite animations (dashboard banner, container icon, pending badge, warn banner, spinner) now honour reduced motion and the in-app motion setting, ConnectionDot uses the same three-rule shape as the others, and the hive-warn element honours the system preference. Keyboard focus gets a default ring, and the cancel button and pane divider keep a visible one.
62 lines
2.3 KiB
CSS
62 lines
2.3 KiB
CSS
/* Base typography shared by the hive-c0re dashboard and the hive-ag3nt
|
|
web UI. The colour variables it references (`--bg`, `--fg`, …) live in
|
|
the standalone `theme.css` (Catppuccin Mocha), linked separately by
|
|
every page BEFORE this file so the `:root` vars resolve — see
|
|
`theme.css` + docs/4-implementation/web-ui/css-vars.md. Per-page stylesheets append on
|
|
top of this and must NOT redeclare the colour variables; `theme.css`
|
|
is the one source of truth. */
|
|
/* A visible ring on keyboard focus wherever a component has not drawn its own.
|
|
`:where` keeps the specificity at zero, so every component rule wins. The UA
|
|
ring is close to invisible on the dark, translucent surfaces. */
|
|
:where(:focus-visible) {
|
|
outline: 2px solid var(--purple);
|
|
outline-offset: 2px;
|
|
}
|
|
body {
|
|
/* The default UA stylesheet gives `body` an 8px margin — every page
|
|
using this shared base had it as a `--bg`-coloured strip visible
|
|
around the whole viewport edge, e.g. left/right of any full-bleed
|
|
header (swarm-ui's `.shell-header`, `--bg-elev`, doesn't actually
|
|
reach the real viewport edge without this). Reported live as
|
|
"small bg colored gap left and right of the header" (reported live
|
|
by mara).
|
|
Zeroed here since every page linking this file wants full-bleed
|
|
chrome, not a browser default nobody asked for. */
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
font-family:
|
|
"JetBrains Mono", "Fira Code", "Cascadia Code", "Source Code Pro", monospace;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Loading spinner used by the shared `asyncBtn()` helper (forms.js) —
|
|
swapped into a button's content while its async action is in flight.
|
|
Lives here (not in a per-page stylesheet) because asyncBtn itself is
|
|
shared between the dashboard and the per-agent UI; keeping the CSS
|
|
with the JS component it styles avoids one consumer rendering an
|
|
unstyled, unanimated glyph. */
|
|
.spinner {
|
|
display: inline-block;
|
|
animation: spin 1s linear infinite;
|
|
color: var(--amber);
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.spinner {
|
|
animation: none;
|
|
}
|
|
}
|
|
:root[data-motion="reduce"] .spinner {
|
|
animation: none;
|
|
}
|
|
:root[data-motion="allow"] .spinner {
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
@keyframes spin {
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|