Commit 75adce5
feat: Add system light/dark theme support to graph browser
Implements automatic theme detection respecting OS preferences:
CSS Updates:
- Added CSS custom properties for light/dark themes
- Light theme (default): White backgrounds, dark text
- Dark theme: Dark backgrounds, light text
- @media (prefers-color-scheme: dark) for automatic switching
- Smooth transitions between themes
Theme Variables:
Light Mode:
- Backgrounds: #ffffff, #f5f5f5, #e8e8e8
- Text: #333, #666
- Borders: #ddd
- Shadow: rgba(0,0,0,0.1)
Dark Mode:
- Backgrounds: #1e1e1e, #141414, #2a2a2a
- Text: #e0e0e0, #999
- Borders: #333
- Shadow: rgba(0,0,0,0.3)
CodeMirror Integration:
- Light mode: 'eclipse' theme
- Dark mode: 'dracula' theme
- Dynamic theme switching with matchMedia listener
- Responds to system theme changes in real-time
Features:
✅ Automatic OS theme detection
✅ Real-time theme switching
✅ CodeMirror editor theme sync
✅ Maintains contrast in both modes
✅ Professional appearance in light/dark
✅ No manual toggle needed (respects OS)
Test:
- macOS: System Preferences → General → Appearance
- Windows: Settings → Personalization → Colors
- Linux: System settings → Appearance
Browser will automatically update when system theme changes.
🚀 Generated with Claude Code
Co-Authored-By: Claude <[email protected]>1 parent 73f8aa8 commit 75adce5
1 file changed
+49
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
34 | | - | |
| 50 | + | |
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
39 | 55 | | |
40 | 56 | | |
41 | 57 | | |
42 | | - | |
| 58 | + | |
43 | 59 | | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
47 | 63 | | |
| 64 | + | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
| |||
77 | 94 | | |
78 | 95 | | |
79 | 96 | | |
80 | | - | |
| 97 | + | |
| 98 | + | |
81 | 99 | | |
82 | 100 | | |
83 | 101 | | |
84 | | - | |
| 102 | + | |
85 | 103 | | |
86 | 104 | | |
87 | 105 | | |
| |||
93 | 111 | | |
94 | 112 | | |
95 | 113 | | |
96 | | - | |
| 114 | + | |
97 | 115 | | |
98 | 116 | | |
99 | 117 | | |
| |||
113 | 131 | | |
114 | 132 | | |
115 | 133 | | |
116 | | - | |
| 134 | + | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
| |||
145 | 163 | | |
146 | 164 | | |
147 | 165 | | |
148 | | - | |
| 166 | + | |
149 | 167 | | |
150 | 168 | | |
151 | 169 | | |
| |||
173 | 191 | | |
174 | 192 | | |
175 | 193 | | |
176 | | - | |
| 194 | + | |
177 | 195 | | |
178 | 196 | | |
179 | 197 | | |
| |||
221 | 239 | | |
222 | 240 | | |
223 | 241 | | |
224 | | - | |
| 242 | + | |
225 | 243 | | |
226 | 244 | | |
227 | 245 | | |
| |||
234 | 252 | | |
235 | 253 | | |
236 | 254 | | |
237 | | - | |
| 255 | + | |
238 | 256 | | |
239 | 257 | | |
240 | 258 | | |
| |||
251 | 269 | | |
252 | 270 | | |
253 | 271 | | |
254 | | - | |
| 272 | + | |
255 | 273 | | |
256 | 274 | | |
257 | 275 | | |
| |||
263 | 281 | | |
264 | 282 | | |
265 | 283 | | |
266 | | - | |
| 284 | + | |
267 | 285 | | |
268 | 286 | | |
269 | 287 | | |
| |||
273 | 291 | | |
274 | 292 | | |
275 | 293 | | |
276 | | - | |
| 294 | + | |
277 | 295 | | |
278 | 296 | | |
279 | 297 | | |
| |||
285 | 303 | | |
286 | 304 | | |
287 | 305 | | |
288 | | - | |
| 306 | + | |
289 | 307 | | |
290 | 308 | | |
291 | 309 | | |
| |||
296 | 314 | | |
297 | 315 | | |
298 | 316 | | |
299 | | - | |
| 317 | + | |
300 | 318 | | |
301 | 319 | | |
302 | 320 | | |
303 | 321 | | |
304 | 322 | | |
305 | 323 | | |
306 | 324 | | |
307 | | - | |
| 325 | + | |
308 | 326 | | |
309 | 327 | | |
310 | 328 | | |
311 | 329 | | |
312 | 330 | | |
313 | 331 | | |
| 332 | + | |
314 | 333 | | |
315 | 334 | | |
316 | 335 | | |
| |||
487 | 506 | | |
488 | 507 | | |
489 | 508 | | |
490 | | - | |
| 509 | + | |
| 510 | + | |
491 | 511 | | |
492 | 512 | | |
493 | | - | |
| 513 | + | |
494 | 514 | | |
495 | 515 | | |
496 | 516 | | |
497 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
498 | 523 | | |
499 | 524 | | |
500 | 525 | | |
| |||
0 commit comments