frontend: light-theme terminal contrast, theme before first paint, color-scheme, motion and focus defaults
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.
This commit is contained in:
parent
16260108ee
commit
3d88108c4f
1 changed files with 257 additions and 23 deletions
|
|
@ -142,6 +142,17 @@ body.dashboard-shell {
|
|||
.banner.active {
|
||||
animation: banner-shimmer 1.8s linear infinite;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.banner.active {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
:root[data-motion="reduce"] .banner.active {
|
||||
animation: none;
|
||||
}
|
||||
:root[data-motion="allow"] .banner.active {
|
||||
animation: banner-shimmer 1.8s linear infinite;
|
||||
}
|
||||
@keyframes banner-shimmer {
|
||||
from {
|
||||
background-position: 200% 0;
|
||||
|
|
@ -329,6 +340,21 @@ hive-agent-menu {
|
|||
animation: container-icon-spin 0.9s linear infinite;
|
||||
pointer-events: none;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.container-row.pending-running > .container-icon::after {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
:root[data-motion="reduce"]
|
||||
.container-row.pending-running
|
||||
> .container-icon::after {
|
||||
animation: none;
|
||||
}
|
||||
:root[data-motion="allow"]
|
||||
.container-row.pending-running
|
||||
> .container-icon::after {
|
||||
animation: container-icon-spin 0.9s linear infinite;
|
||||
}
|
||||
.container-row .head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -436,6 +462,17 @@ hive-agent-menu {
|
|||
text-shadow: 0 0 6px color-mix(in srgb, var(--amber) 55%, transparent);
|
||||
animation: badge-pulse 1.6s ease-in-out infinite;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.pending-state {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
:root[data-motion="reduce"] .pending-state {
|
||||
animation: none;
|
||||
}
|
||||
:root[data-motion="allow"] .pending-state {
|
||||
animation: badge-pulse 1.6s ease-in-out infinite;
|
||||
}
|
||||
@keyframes badge-pulse {
|
||||
0%,
|
||||
100% {
|
||||
|
|
|
|||
Loading…
Reference in a new issue