From ca45b97c6001e860ea44be97f5864b49d859d8f4 Mon Sep 17 00:00:00 2001 From: poyrazavsever Date: Mon, 31 Aug 2026 12:40:20 +0300 Subject: [PATCH] fix(projects): enforce contribution colors by theme --- app/globals.css | 10 ++++++++++ components/github-contribution-graph.tsx | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/globals.css b/app/globals.css index 3bc56fa..01ca012 100644 --- a/app/globals.css +++ b/app/globals.css @@ -10,6 +10,12 @@ @layer base { :root { --poyraz-font-secondary: "Nunito", ui-rounded, "Avenir Next", system-ui, sans-serif; + --github-contribution-empty: #ebedf0; + } + + .dark, + [data-poyraz-theme="dark"] { + --github-contribution-empty: #27272a; } } @@ -23,6 +29,10 @@ html[data-poyraz-theme="light"] body { } @layer utilities { + .github-contribution-empty { + fill: var(--github-contribution-empty); + } + @keyframes marquee { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } diff --git a/components/github-contribution-graph.tsx b/components/github-contribution-graph.tsx index 92aa888..8e0b5d9 100644 --- a/components/github-contribution-graph.tsx +++ b/components/github-contribution-graph.tsx @@ -12,7 +12,7 @@ const GRAPH_HEIGHT = 104; const DAY_IN_MS = 24 * 60 * 60 * 1000; const LEVEL_CLASSES: Record = { - 0: "fill-zinc-200 dark:fill-zinc-800", + 0: "github-contribution-empty", 1: "fill-[#ff7373]", 2: "fill-[#ff5959]", 3: "fill-[#dc2626]",