Skip to content

Commit 050b5e1

Browse files
committed
chore(ai-chat): declare onboarding iframe theme as CSS custom properties
Companion to the AIChatPanel.js refactor: the iframe-theme values now live as --bg-panel / --text-primary / --accent-primary / etc. on .ai-chat-panel itself. JS reads them via getComputedStyle and forwards them to the iframe, so retheming is purely editing this LESS list — no JS change required.
1 parent 2bed1bc commit 050b5e1

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/styles/Extn-AIChatPanel.less

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,32 @@
5757
color: @project-panel-text-1;
5858
font-size: @ai-text-body;
5959
container-type: inline-size;
60+
61+
/* Onboarding-iframe theme variables — single source of truth for
62+
what gets forwarded to the iframe's `?configCSS=` param.
63+
AIChatPanel.js _buildOnboardingConfigCSS reads each of these via
64+
getComputedStyle and serialises them into a :root{...} block.
65+
To retheme the iframe, edit only this list. The names match the
66+
iframe's published contract (see ai-panel-onboarding README). */
67+
--bg-panel: @bc-ai-sidebar-bg;
68+
--bg-card: rgba(255, 255, 255, 0.04);
69+
--bg-card-hover: rgba(255, 255, 255, 0.07);
70+
--bg-input: rgba(255, 255, 255, 0.04);
71+
--bg-input-focus: rgba(255, 255, 255, 0.06);
72+
--text-primary: @project-panel-text-1;
73+
--text-secondary: @project-panel-text-2;
74+
--text-muted: rgba(168, 176, 180, 0.6);
75+
--border-subtle: rgba(255, 255, 255, 0.12);
76+
--border-active: rgba(107, 158, 255, 0.4);
77+
--border-focus: rgba(107, 158, 255, 0.5);
78+
--accent-primary: #6b9eff;
79+
--accent-primary-soft: rgba(107, 158, 255, 0.12);
80+
--accent-primary-border: rgba(107, 158, 255, 0.3);
81+
--font-body: 14px;
82+
--font-secondary: 12px;
83+
--font-meta: 11px;
84+
--radius-md: 6px;
85+
--radius-lg: 8px;
6086
}
6187

6288
/* ── Header ─────────────────────────────────────────────────────────── */

0 commit comments

Comments
 (0)