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.
59 lines
1.5 KiB
CSS
59 lines
1.5 KiB
CSS
.ui-conn-dot {
|
|
display: inline-block;
|
|
width: 0.65em;
|
|
height: 0.65em;
|
|
flex: none;
|
|
border-radius: 50%;
|
|
background: var(--muted);
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg) 70%, transparent);
|
|
}
|
|
.ui-conn-dot-open {
|
|
background: var(--green);
|
|
box-shadow:
|
|
0 0 0 2px color-mix(in srgb, var(--bg) 70%, transparent),
|
|
0 0 6px var(--green);
|
|
}
|
|
.ui-conn-dot-connecting,
|
|
.ui-conn-dot-reconnecting {
|
|
background: var(--amber);
|
|
}
|
|
.ui-conn-dot-closed {
|
|
background: var(--red);
|
|
}
|
|
/* On the corner of the icon: the light sits half over its bottom-right edge. */
|
|
.ui-live-icon {
|
|
position: relative;
|
|
display: inline-flex;
|
|
}
|
|
.ui-conn-dot-on-icon {
|
|
position: absolute;
|
|
right: -0.2em;
|
|
bottom: -0.2em;
|
|
}
|
|
.ui-conn-dot-connecting,
|
|
.ui-conn-dot-reconnecting {
|
|
animation: ui-conn-dot-pulse 1.2s ease-in-out infinite;
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.ui-conn-dot-connecting,
|
|
.ui-conn-dot-reconnecting {
|
|
animation: none;
|
|
}
|
|
}
|
|
:root[data-motion="reduce"] .ui-conn-dot-connecting,
|
|
:root[data-motion="reduce"] .ui-conn-dot-reconnecting {
|
|
animation: none;
|
|
}
|
|
:root[data-motion="allow"] .ui-conn-dot-connecting,
|
|
:root[data-motion="allow"] .ui-conn-dot-reconnecting {
|
|
animation: ui-conn-dot-pulse 1.2s ease-in-out infinite;
|
|
}
|
|
@keyframes ui-conn-dot-pulse {
|
|
50% {
|
|
opacity: 0.45;
|
|
}
|
|
}
|
|
/* Alone in a terminal's top corner, with room around it. */
|
|
.ui-agent-term-preview-controls .ui-conn-dot:not(.ui-conn-dot-on-icon) {
|
|
margin: 0.55em 0 0 0.55em;
|
|
}
|