Skip to content

Commit 41bd8ff

Browse files
Ajit Pratap Singhclaude
authored andcommitted
fix(website): complete light mode audit — slate colors, playground, badges
Audit of all 21 page/component files found remaining light mode gaps: - Add slate-200 through slate-600 text color overrides (playground tabs) - Add bg-slate-700/800/900/950 background overrides - Add border-slate-500/700/800 border overrides - Add bg-zinc-800/900/950 background overrides - Add bg-surface override for docs sidebar - Keep playground editor dark in light mode (convention) via scoped overrides targeting the h-[calc(100vh-64px)] container - Reduce hero gradient opacity from 0.3 to 0.15 in light mode - Fix ThemeToggle: remove non-functional light:/dark: pseudo-classes, simplify to standard classes that work with CSS overrides Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0bf4270 commit 41bd8ff

2 files changed

Lines changed: 47 additions & 3 deletions

File tree

website/src/app/globals.css

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,15 @@ html.light .text-zinc-200 { color: #374151 !important; }
145145
html.light .text-zinc-300 { color: #4B5563 !important; }
146146
html.light .text-zinc-400 { color: #6B7280 !important; }
147147
html.light .text-zinc-500 { color: #6B7280 !important; }
148+
html.light .text-zinc-600 { color: #4B5563 !important; }
148149
html.light .text-indigo-300 { color: #4338CA !important; }
149150
html.light .text-emerald-400 { color: #059669 !important; }
151+
/* Slate palette (used in playground components) */
152+
html.light .text-slate-200 { color: #374151 !important; }
153+
html.light .text-slate-300 { color: #4B5563 !important; }
154+
html.light .text-slate-400 { color: #4B5563 !important; }
155+
html.light .text-slate-500 { color: #6B7280 !important; }
156+
html.light .text-slate-600 { color: #4B5563 !important; }
150157

151158
/* --- Heading gradient: dark gradient on light bg --- */
152159
html.light .from-white { --tw-gradient-from: #0F172A !important; }
@@ -177,6 +184,27 @@ html.light [class*="bg-white\\/10"] { background-color: rgba(0, 0, 0, 0.05) !imp
177184

178185
/* --- Primary bg (used as bg-primary on mobile menu, etc.) --- */
179186
html.light .bg-primary { background-color: #FAFBFC !important; }
187+
html.light .bg-surface { background-color: #FFFFFF !important; }
188+
189+
/* --- Slate backgrounds (playground, panels) --- */
190+
html.light .bg-slate-800 { background-color: #E5E7EB !important; }
191+
html.light .bg-slate-900 { background-color: #F3F4F6 !important; }
192+
html.light .bg-slate-950 { background-color: #F9FAFB !important; }
193+
html.light [class*="bg-slate-800\\/"] { background-color: rgba(0, 0, 0, 0.04) !important; }
194+
html.light [class*="bg-slate-900\\/"] { background-color: rgba(0, 0, 0, 0.03) !important; }
195+
html.light [class*="bg-slate-700\\/"] { background-color: rgba(0, 0, 0, 0.05) !important; }
196+
html.light [class*="bg-slate-500\\/"] { background-color: rgba(0, 0, 0, 0.06) !important; }
197+
198+
/* Slate borders */
199+
html.light .border-slate-700 { border-color: rgba(0, 0, 0, 0.10) !important; }
200+
html.light .border-slate-800 { border-color: rgba(0, 0, 0, 0.08) !important; }
201+
html.light [class*="border-slate-500\\/"] { border-color: rgba(0, 0, 0, 0.12) !important; }
202+
html.light [class*="border-slate-700\\/"] { border-color: rgba(0, 0, 0, 0.08) !important; }
203+
204+
/* Zinc backgrounds */
205+
html.light .bg-zinc-800 { background-color: #E5E7EB !important; }
206+
html.light .bg-zinc-900 { background-color: #F3F4F6 !important; }
207+
html.light .bg-zinc-950 { background-color: #F9FAFB !important; }
180208

181209
/* --- Navbar --- */
182210
html.light header[class*="border-b"] { border-color: rgba(0, 0, 0, 0.08); }
@@ -244,8 +272,24 @@ html.light .border-accent-indigo\\/30 {
244272
border-color: rgba(99, 102, 241, 0.25);
245273
}
246274

247-
/* --- Hero background gradients: hide on light mode --- */
248-
html.light section > [aria-hidden="true"] { opacity: 0.3; }
275+
/* --- Hero background gradients: reduce on light mode --- */
276+
html.light section > [aria-hidden="true"] { opacity: 0.15; }
277+
278+
/* --- Playground: keep dark editor theme in light mode --- */
279+
html.light .h-\\[calc\\(100vh-64px\\)] {
280+
background-color: #0F172A;
281+
}
282+
html.light .h-\\[calc\\(100vh-64px\\)] .text-white { color: #F8FAFC !important; }
283+
html.light .h-\\[calc\\(100vh-64px\\)] .text-zinc-300 { color: #D4D4D8 !important; }
284+
html.light .h-\\[calc\\(100vh-64px\\)] .text-zinc-400 { color: #A1A1AA !important; }
285+
html.light .h-\\[calc\\(100vh-64px\\)] .text-slate-400 { color: #94A3B8 !important; }
286+
html.light .h-\\[calc\\(100vh-64px\\)] .text-slate-300 { color: #CBD5E1 !important; }
287+
html.light .h-\\[calc\\(100vh-64px\\)] .bg-slate-900 { background-color: #0F172A !important; }
288+
html.light .h-\\[calc\\(100vh-64px\\)] .bg-slate-800 { background-color: #1E293B !important; }
289+
html.light .h-\\[calc\\(100vh-64px\\)] .bg-zinc-900 { background-color: #18181B !important; }
290+
html.light .h-\\[calc\\(100vh-64px\\)] .border-slate-700 { border-color: rgba(255, 255, 255, 0.08) !important; }
291+
html.light .h-\\[calc\\(100vh-64px\\)] .border-slate-800 { border-color: rgba(255, 255, 255, 0.06) !important; }
292+
html.light .h-\\[calc\\(100vh-64px\\)] [class*="border-white\\/"] { border-color: rgba(255, 255, 255, 0.08) !important; }
249293

250294
/* --- Code blocks / pre elements --- */
251295
html.light pre[class*="font-mono"] {

website/src/components/ui/ThemeToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function ThemeToggle() {
6868
<button
6969
type="button"
7070
onClick={toggle}
71-
className="text-zinc-300 hover:text-white dark:text-zinc-300 dark:hover:text-white light:text-zinc-600 light:hover:text-zinc-900 transition-colors duration-200 p-2 rounded-lg hover:bg-white/[0.04] dark:hover:bg-white/[0.04] light:hover:bg-black/[0.04]"
71+
className="text-zinc-400 hover:text-white transition-colors duration-200 p-2 rounded-lg hover:bg-white/[0.04]"
7272
aria-label={theme === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'}
7373
>
7474
{theme === 'dark' ? (

0 commit comments

Comments
 (0)