Skip to content

Commit ffe197c

Browse files
committed
fix(devtools-ui): replace hardcoded rgba() with theme-aware CSS variables
1 parent de5b674 commit ffe197c

1 file changed

Lines changed: 33 additions & 21 deletions

File tree

packages/devtools-ui/src/panel.css

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@
1919
--muted: #8b949e;
2020
--dim: #484f58;
2121
--blue: #58a6ff;
22+
--blue-rgb: 88, 166, 255;
2223
--green: #3fb950;
24+
--green-rgb: 63, 185, 80;
2325
--red: #f85149;
26+
--red-rgb: 248, 81, 73;
2427
--orange: #ffa657;
28+
--orange-rgb: 255, 166, 87;
2529
--yellow: #d29922;
30+
--yellow-rgb: 210, 153, 34;
2631
--purple: #bc8cff;
32+
--purple-rgb: 188, 140, 255;
2733
--shadow-alpha: 0.3;
2834
--font-ui: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
2935
--font-mono: 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
@@ -46,11 +52,17 @@
4652
--muted: #636c76;
4753
--dim: #8c959f;
4854
--blue: #0969da;
55+
--blue-rgb: 9, 105, 218;
4956
--green: #1a7f37;
57+
--green-rgb: 26, 127, 55;
5058
--red: #cf222e;
59+
--red-rgb: 207, 34, 46;
5160
--orange: #bc4c00;
61+
--orange-rgb: 188, 76, 0;
5262
--yellow: #9a6700;
63+
--yellow-rgb: 154, 103, 0;
5364
--purple: #8250df;
65+
--purple-rgb: 130, 80, 223;
5466
--shadow-alpha: 0.12;
5567
}
5668

@@ -167,7 +179,7 @@ body {
167179
border-color: var(--red);
168180
}
169181
.tb-btn.recording:hover {
170-
background: rgba(248, 81, 73, 0.1);
182+
background: rgba(var(--red-rgb), 0.1);
171183
}
172184

173185
.rec-dot {
@@ -256,11 +268,11 @@ body {
256268
/* ── Error Banner ────────────────────────────────────────── */
257269
.err-banner {
258270
padding: 5px 12px;
259-
background: rgba(248, 81, 73, 0.08);
271+
background: rgba(var(--red-rgb), 0.08);
260272
color: var(--red);
261273
font-family: var(--font-mono);
262274
font-size: 11px;
263-
border-bottom: 1px solid rgba(248, 81, 73, 0.25);
275+
border-bottom: 1px solid rgba(var(--red-rgb), 0.25);
264276
flex-shrink: 0;
265277
}
266278

@@ -331,19 +343,19 @@ body {
331343
flex-shrink: 0;
332344
}
333345
.b-net {
334-
background: rgba(88, 166, 255, 0.1);
346+
background: rgba(var(--blue-rgb), 0.1);
335347
color: var(--blue);
336348
}
337349
.b-sdk {
338-
background: rgba(63, 185, 80, 0.1);
350+
background: rgba(var(--green-rgb), 0.1);
339351
color: var(--green);
340352
}
341353
.b-ses {
342-
background: rgba(255, 166, 87, 0.1);
354+
background: rgba(var(--orange-rgb), 0.1);
343355
color: var(--orange);
344356
}
345357
.b-cfg {
346-
background: rgba(188, 140, 255, 0.1);
358+
background: rgba(var(--purple-rgb), 0.1);
347359
color: var(--purple);
348360
}
349361

@@ -427,15 +439,15 @@ body {
427439
overflow: visible;
428440
}
429441
.tag-cors {
430-
background: rgba(248, 81, 73, 0.12);
442+
background: rgba(var(--red-rgb), 0.12);
431443
color: var(--red);
432444
}
433445
.tag-oidc {
434-
background: rgba(88, 166, 255, 0.12);
446+
background: rgba(var(--blue-rgb), 0.12);
435447
color: var(--blue);
436448
}
437449
.tag-coll {
438-
background: rgba(88, 166, 255, 0.12);
450+
background: rgba(var(--blue-rgb), 0.12);
439451
color: var(--blue);
440452
}
441453

@@ -570,7 +582,7 @@ body {
570582
transition: background 0.12s;
571583
}
572584
.cause-btn:hover {
573-
background: rgba(88, 166, 255, 0.1);
585+
background: rgba(var(--blue-rgb), 0.1);
574586
}
575587

576588
/* collector card */
@@ -692,8 +704,8 @@ body {
692704
font-weight: 700;
693705
letter-spacing: 0.04em;
694706
color: var(--purple);
695-
background: rgba(188, 140, 255, 0.1);
696-
border: 1px solid rgba(188, 140, 255, 0.3);
707+
background: rgba(var(--purple-rgb), 0.1);
708+
border: 1px solid rgba(var(--purple-rgb), 0.3);
697709
border-radius: 3px;
698710
padding: 1px 6px;
699711
list-style: none;
@@ -712,8 +724,8 @@ details[open] > .jwt-summary::before {
712724
.jwt-body {
713725
margin-top: 6px;
714726
padding: 8px 10px;
715-
background: rgba(188, 140, 255, 0.04);
716-
border: 1px solid rgba(188, 140, 255, 0.15);
727+
background: rgba(var(--purple-rgb), 0.04);
728+
border: 1px solid rgba(var(--purple-rgb), 0.15);
717729
border-radius: 4px;
718730
font-family: var(--font-mono);
719731
font-size: 11px;
@@ -765,7 +777,7 @@ details[open] > .jwt-summary::before {
765777
.jwt-expired {
766778
display: inline-flex;
767779
align-items: center;
768-
background: rgba(248, 81, 73, 0.15);
780+
background: rgba(var(--red-rgb), 0.15);
769781
color: var(--red);
770782
font-size: 9px;
771783
font-weight: 700;
@@ -911,11 +923,11 @@ details[open] > .jwt-summary::before {
911923
font-size: 11px;
912924
}
913925
.fh-error {
914-
background: rgba(248, 81, 73, 0.08);
926+
background: rgba(var(--red-rgb), 0.08);
915927
border-left: 3px solid var(--red);
916928
}
917929
.fh-warning {
918-
background: rgba(210, 153, 34, 0.08);
930+
background: rgba(var(--yellow-rgb), 0.08);
919931
border-left: 3px solid var(--yellow);
920932
}
921933
.fh-header {
@@ -1011,11 +1023,11 @@ details[open] > .jwt-summary::before {
10111023
}
10121024
.diag-issue-error {
10131025
border-left-color: var(--red);
1014-
background: rgba(248, 81, 73, 0.06);
1026+
background: rgba(var(--red-rgb), 0.06);
10151027
}
10161028
.diag-issue-warning {
10171029
border-left-color: var(--yellow);
1018-
background: rgba(210, 153, 34, 0.06);
1030+
background: rgba(var(--yellow-rgb), 0.06);
10191031
}
10201032
.diag-issue-info {
10211033
border-left-color: var(--blue);
@@ -1251,7 +1263,7 @@ body.resizing {
12511263
}
12521264
.snapshot-delete:hover {
12531265
color: var(--red);
1254-
background: rgba(248, 81, 73, 0.1);
1266+
background: rgba(var(--red-rgb), 0.1);
12551267
}
12561268

12571269
/* ── Import banner ────────────────────────────────── */

0 commit comments

Comments
 (0)