diff --git a/docs/4-implementation/web-ui/swarm-ui.md b/docs/4-implementation/web-ui/swarm-ui.md index 3fa70ab6b..1a860dab6 100644 --- a/docs/4-implementation/web-ui/swarm-ui.md +++ b/docs/4-implementation/web-ui/swarm-ui.md @@ -193,7 +193,7 @@ the same terminals, apart from the toggle above: thinking can be on with the developer details hidden, or off with them shown. The menu also has a **solid backgrounds** toggle. It turns the frosted, see-through -surfaces opaque: the header bar, the badges and the terminal panes. It stays off +surfaces opaque: the header bar, the badges, the terminal panes and the message box. It stays off until you turn it on, and the browser keeps the choice. The menu also has an **expand tool output** toggle. It opens tool-output rows diff --git a/frontend/packages/shared/src/settings/solid-backgrounds.css b/frontend/packages/shared/src/settings/solid-backgrounds.css index eaf63c476..afacf1a76 100644 --- a/frontend/packages/shared/src/settings/solid-backgrounds.css +++ b/frontend/packages/shared/src/settings/solid-backgrounds.css @@ -18,3 +18,8 @@ html:root[data-solid="true"] .terminal-wrap { -webkit-backdrop-filter: none; backdrop-filter: none; } +html:root[data-solid="true"] .ui-agent-input-form { + background: var(--bg-elev); + -webkit-backdrop-filter: none; + backdrop-filter: none; +} diff --git a/frontend/packages/swarm-ui/src/agent/terminal/AgentInputForm.css b/frontend/packages/swarm-ui/src/agent/terminal/AgentInputForm.css index 23eaa973d..eab5f371b 100644 --- a/frontend/packages/swarm-ui/src/agent/terminal/AgentInputForm.css +++ b/frontend/packages/swarm-ui/src/agent/terminal/AgentInputForm.css @@ -24,11 +24,34 @@ padding: 0.25em 0.25em 0.25em 1.1em; border: 1px solid var(--purple-dim); border-radius: 999px; - background: var(--bg-elev); + /* 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 + fill. */ + background: color-mix(in srgb, var(--bg-elev) 55%, transparent); + -webkit-backdrop-filter: blur(10px) saturate(140%); + backdrop-filter: blur(10px) saturate(140%); box-shadow: 0 0.3em 1em rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--purple) 12%, transparent); } +@media (prefers-color-scheme: light) { + .ui-agent-input-form { + background: var(--bg-elev); + -webkit-backdrop-filter: none; + backdrop-filter: none; + } +} +:root[data-theme="light"] .ui-agent-input-form { + background: var(--bg-elev); + -webkit-backdrop-filter: none; + backdrop-filter: none; +} +:root[data-theme="dark"] .ui-agent-input-form { + background: color-mix(in srgb, var(--bg-elev) 55%, transparent); + -webkit-backdrop-filter: blur(10px) saturate(140%); + backdrop-filter: blur(10px) saturate(140%); +} .ui-agent-input-form:focus-within { border-color: var(--purple); box-shadow: