Skip to content

Commit 3525694

Browse files
committed
feat(chrome): add dark mode support to popup
1 parent 73ccf41 commit 3525694

File tree

1 file changed

+78
-32
lines changed
  • packages/agent-os/extensions/chrome/src/popup

1 file changed

+78
-32
lines changed

packages/agent-os/extensions/chrome/src/popup/styles.css

Lines changed: 78 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,49 @@
1313
--gray-500: #6b7280;
1414
--gray-700: #374151;
1515
--gray-900: #111827;
16+
--text-primary: var(--gray-900);
17+
--text-secondary: var(--gray-500);
18+
--surface-app: var(--gray-50);
19+
--surface-panel: #ffffff;
20+
--surface-subtle: var(--gray-100);
21+
--surface-elevated: #ffffff;
22+
--border-color: var(--gray-200);
23+
--border-strong: var(--gray-300);
24+
--shadow-color: rgba(99, 102, 241, 0.1);
25+
--header-icon-bg: rgba(255, 255, 255, 0.2);
26+
--header-icon-bg-hover: rgba(255, 255, 255, 0.3);
27+
--status-enabled-bg: #ecfdf5;
28+
--status-enabled-border: #a7f3d0;
29+
--status-disabled-bg: #fef2f2;
30+
--status-disabled-border: #fecaca;
31+
--suggested-bg: #fef3c7;
32+
--suggested-border: #fcd34d;
33+
--suggested-title: #92400e;
34+
}
35+
36+
@media (prefers-color-scheme: dark) {
37+
:root {
38+
--primary: #818cf8;
39+
--primary-dark: #6366f1;
40+
--text-primary: #f9fafb;
41+
--text-secondary: #cbd5e1;
42+
--surface-app: #0f172a;
43+
--surface-panel: #111827;
44+
--surface-subtle: #1f2937;
45+
--surface-elevated: #1f2937;
46+
--border-color: #334155;
47+
--border-strong: #475569;
48+
--shadow-color: rgba(15, 23, 42, 0.45);
49+
--header-icon-bg: rgba(15, 23, 42, 0.32);
50+
--header-icon-bg-hover: rgba(15, 23, 42, 0.48);
51+
--status-enabled-bg: rgba(34, 197, 94, 0.16);
52+
--status-enabled-border: rgba(74, 222, 128, 0.35);
53+
--status-disabled-bg: rgba(239, 68, 68, 0.14);
54+
--status-disabled-border: rgba(248, 113, 113, 0.35);
55+
--suggested-bg: rgba(245, 158, 11, 0.16);
56+
--suggested-border: rgba(251, 191, 36, 0.36);
57+
--suggested-title: #fde68a;
58+
}
1659
}
1760

1861
* {
@@ -22,10 +65,11 @@
2265
}
2366

2467
body {
68+
color-scheme: light dark;
2569
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
2670
font-size: 14px;
27-
color: var(--gray-900);
28-
background: var(--gray-50);
71+
color: var(--text-primary);
72+
background: var(--surface-app);
2973
}
3074

3175
.popup-container {
@@ -66,7 +110,7 @@ body {
66110
}
67111

68112
.icon-btn {
69-
background: rgba(255, 255, 255, 0.2);
113+
background: var(--header-icon-bg);
70114
border: none;
71115
border-radius: 8px;
72116
padding: 8px;
@@ -76,7 +120,7 @@ body {
76120
}
77121

78122
.icon-btn:hover {
79-
background: rgba(255, 255, 255, 0.3);
123+
background: var(--header-icon-bg-hover);
80124
}
81125

82126
/* Status Banner */
@@ -85,18 +129,18 @@ body {
85129
align-items: center;
86130
gap: 8px;
87131
padding: 12px 16px;
88-
background: white;
89-
border-bottom: 1px solid var(--gray-200);
132+
background: var(--surface-panel);
133+
border-bottom: 1px solid var(--border-color);
90134
}
91135

92136
.status-banner.enabled {
93-
background: #ecfdf5;
94-
border-color: #a7f3d0;
137+
background: var(--status-enabled-bg);
138+
border-color: var(--status-enabled-border);
95139
}
96140

97141
.status-banner.disabled {
98-
background: #fef2f2;
99-
border-color: #fecaca;
142+
background: var(--status-disabled-bg);
143+
border-color: var(--status-disabled-border);
100144
}
101145

102146
.status-dot {
@@ -116,13 +160,13 @@ body {
116160
/* Current Page Section */
117161
.current-page {
118162
padding: 16px;
119-
background: white;
120-
border-bottom: 1px solid var(--gray-200);
163+
background: var(--surface-panel);
164+
border-bottom: 1px solid var(--border-color);
121165
}
122166

123167
.current-page-title {
124168
font-size: 12px;
125-
color: var(--gray-500);
169+
color: var(--text-secondary);
126170
margin-bottom: 4px;
127171
}
128172

@@ -159,12 +203,12 @@ body {
159203
.section-title {
160204
font-size: 14px;
161205
font-weight: 600;
162-
color: var(--gray-700);
206+
color: var(--text-primary);
163207
}
164208

165209
.agent-count {
166210
font-size: 12px;
167-
color: var(--gray-500);
211+
color: var(--text-secondary);
168212
}
169213

170214
.agents-list {
@@ -174,8 +218,8 @@ body {
174218
}
175219

176220
.agent-card {
177-
background: white;
178-
border: 1px solid var(--gray-200);
221+
background: var(--surface-elevated);
222+
border: 1px solid var(--border-color);
179223
border-radius: 8px;
180224
padding: 12px;
181225
cursor: pointer;
@@ -184,7 +228,7 @@ body {
184228

185229
.agent-card:hover {
186230
border-color: var(--primary);
187-
box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
231+
box-shadow: 0 2px 8px var(--shadow-color);
188232
}
189233

190234
.agent-header {
@@ -207,15 +251,15 @@ body {
207251

208252
.agent-description {
209253
font-size: 12px;
210-
color: var(--gray-500);
254+
color: var(--text-secondary);
211255
margin-bottom: 8px;
212256
}
213257

214258
.agent-meta {
215259
display: flex;
216260
gap: 12px;
217261
font-size: 11px;
218-
color: var(--gray-500);
262+
color: var(--text-secondary);
219263
}
220264

221265
.agent-actions {
@@ -224,17 +268,18 @@ body {
224268
}
225269

226270
.action-btn {
227-
background: var(--gray-100);
271+
background: var(--surface-subtle);
228272
border: none;
229273
border-radius: 4px;
230274
padding: 4px 8px;
231275
font-size: 11px;
276+
color: var(--text-primary);
232277
cursor: pointer;
233278
transition: background 0.2s;
234279
}
235280

236281
.action-btn:hover {
237-
background: var(--gray-200);
282+
background: var(--border-color);
238283
}
239284

240285
.action-btn.primary {
@@ -250,7 +295,7 @@ body {
250295
.empty-state {
251296
text-align: center;
252297
padding: 32px 16px;
253-
color: var(--gray-500);
298+
color: var(--text-secondary);
254299
}
255300

256301
.empty-state-icon {
@@ -265,18 +310,19 @@ body {
265310
/* Footer */
266311
.footer {
267312
padding: 12px 16px;
268-
background: white;
269-
border-top: 1px solid var(--gray-200);
313+
background: var(--surface-panel);
314+
border-top: 1px solid var(--border-color);
270315
display: flex;
271316
justify-content: space-between;
272317
}
273318

274319
.footer-btn {
275320
background: none;
276-
border: 1px solid var(--gray-300);
321+
border: 1px solid var(--border-strong);
277322
border-radius: 6px;
278323
padding: 8px 16px;
279324
font-size: 13px;
325+
color: var(--text-primary);
280326
cursor: pointer;
281327
display: flex;
282328
align-items: center;
@@ -285,7 +331,7 @@ body {
285331
}
286332

287333
.footer-btn:hover {
288-
background: var(--gray-100);
334+
background: var(--surface-subtle);
289335
}
290336

291337
.footer-btn.primary {
@@ -301,21 +347,21 @@ body {
301347
/* Suggested Agent */
302348
.suggested-section {
303349
padding: 16px;
304-
background: #fef3c7;
305-
border-bottom: 1px solid #fcd34d;
350+
background: var(--suggested-bg);
351+
border-bottom: 1px solid var(--suggested-border);
306352
}
307353

308354
.suggested-title {
309355
font-size: 12px;
310-
color: #92400e;
356+
color: var(--suggested-title);
311357
margin-bottom: 8px;
312358
display: flex;
313359
align-items: center;
314360
gap: 6px;
315361
}
316362

317363
.suggested-card {
318-
background: white;
364+
background: var(--surface-elevated);
319365
border-radius: 8px;
320366
padding: 12px;
321367
display: flex;
@@ -330,5 +376,5 @@ body {
330376

331377
.suggested-info p {
332378
font-size: 12px;
333-
color: var(--gray-500);
379+
color: var(--text-secondary);
334380
}

0 commit comments

Comments
 (0)