-
Notifications
You must be signed in to change notification settings - Fork 29
[BUG] [v1.1.0] Sub-Agents dialog textarea text renders with invalid CSS color — color: var(--text-base) resolves to 14px in two input fields #29505
Description
Project
cortex
Description
Two textarea elements inside the Sub-Agents dialog (src/components/ai/SubagentsDialog.tsx, lines 483 and 583) both set their text color using color: var(--text-base). In the design token system, --text-base is defined as 14px in design-tokens.css — a font-size value, not a color. This makes both declarations invalid CSS. The browser silently drops them, and typed text inside each field inherits whatever foreground color flows in from the surrounding layout rather than the intended theme value. Depending on the active theme, this can produce poor contrast between the input text and the var(--surface-raised) background the fields already apply, making typed content hard to read.
Error Message
Debug Logs
System Information
Cortex IDE: v1.1.0
OS: Ubuntu 25.04
CPU: 13th Gen Intel Core i7-13650HX
RAM: 15 GB totalScreenshots
Steps to Reproduce
Open Cortex IDE and open the AI Chat panel.
Open the Manage Sub-Agents dialog.
Click the Custom Agent button in the left panel.
The system prompt textarea is now visible.
Open DevTools → Elements and inspect that textarea.
Check the computed color value.
Expected Behavior
Text typed into both textarea fields should render in the primary text color defined by the active theme (--cortex-text-primary). The input content should remain clearly legible against the var(--surface-raised) background regardless of which theme is active.
Actual Behavior
color: var(--text-base) resolves to 14px on both textarea elements, so the browser discards the rule. Typed text inherits a color from an ancestor element, which varies by theme and surrounding DOM context. In certain themes the contrast between the inherited text color and the input background is insufficient, making text entered in either field difficult to read.
Additional Context
No response