Skip to content

Commit b933121

Browse files
raifdmuellerclaude
andcommitted
fix: replace hardcoded tooltip colors with CSS variables
#1e293b → var(--bg-card), #94a3b8 → var(--text-secondary), #475569 → var(--text-muted). Tooltip now respects light/dark theme. Closes part of #16 (Sollte: CSS-Variablen) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d23935a commit b933121

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/RadarChart.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -407,32 +407,32 @@ export default function RadarChart({
407407
width={tooltipW}
408408
height={tooltipH}
409409
rx={10}
410-
fill="#1e293b"
410+
fill="var(--bg-card)"
411411
stroke={tc}
412412
strokeWidth={1.5}
413413
filter="url(#tt-shadow)"
414414
/>
415415
<rect x={tipX} y={tipY} width={4} height={tooltipH} rx={4} fill={tc} />
416-
<text x={tipX + 14} y={tipY + 19} fill="#94a3b8" fontSize="11" fontWeight="500">
416+
<text x={tipX + 14} y={tipY + 19} fill="var(--text-secondary)" fontSize="11" fontWeight="500">
417417
{tooltip.label}
418418
</text>
419419
<text x={tipX + 14} y={tipY + 39} fill={tc} fontSize="19" fontWeight="800">
420420
{tooltip.value}
421-
<tspan fill="#475569" fontSize="11" fontWeight="400">
421+
<tspan fill="var(--text-muted)" fontSize="11" fontWeight="400">
422422
{" "}
423423
/ 4
424424
</tspan>
425425
</text>
426426
<polygon
427427
points={`${tipX + tooltipW / 2 - 7},${tipY + tooltipH} ${tipX + tooltipW / 2 + 7},${tipY + tooltipH} ${tipX + tooltipW / 2},${tipY + tooltipH + 10}`}
428-
fill="#1e293b"
428+
fill="var(--bg-card)"
429429
stroke={tc}
430430
strokeWidth={1.5}
431431
strokeLinejoin="round"
432432
/>
433433
<polygon
434434
points={`${tipX + tooltipW / 2 - 5},${tipY + tooltipH - 1} ${tipX + tooltipW / 2 + 5},${tipY + tooltipH - 1} ${tipX + tooltipW / 2},${tipY + tooltipH + 8}`}
435-
fill="#1e293b"
435+
fill="var(--bg-card)"
436436
/>
437437
</g>
438438
)}

0 commit comments

Comments
 (0)