Skip to content

Commit bae69a6

Browse files
Ajit Pratap Singhclaude
authored andcommitted
fix(website): playground light mode + accent button text-white exception
Two fixes: 1. Remove forced-dark overrides on playground — it now responds to the theme toggle like every other page. CodeMirror editor keeps its own oneDark theme regardless. 2. Add CSS exceptions so text-white stays truly white inside accent-colored backgrounds (bg-accent-indigo, bg-accent-green, bg-brand). Fixes the docs "Get Started" button which had dark text on indigo bg in light mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 41bd8ff commit bae69a6

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

website/src/app/globals.css

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ html.light body {
140140
!important needed because Tailwind v4 compiles utilities inside @layer
141141
which wins the CSS cascade over unlayered selectors. */
142142
html.light .text-white { color: #1A1A2E !important; }
143+
/* Keep text-white truly white inside accent-colored containers */
144+
html.light .bg-accent-indigo .text-white,
145+
html.light .bg-accent-green .text-white,
146+
html.light .bg-brand .text-white,
147+
html.light [class*="bg-accent-indigo"].text-white,
148+
html.light [class*="bg-green-"].text-white,
149+
html.light [class*="bg-indigo-"].text-white { color: #FFFFFF !important; }
143150
html.light .text-zinc-100 { color: #1F2937 !important; }
144151
html.light .text-zinc-200 { color: #374151 !important; }
145152
html.light .text-zinc-300 { color: #4B5563 !important; }
@@ -275,22 +282,6 @@ html.light .border-accent-indigo\\/30 {
275282
/* --- Hero background gradients: reduce on light mode --- */
276283
html.light section > [aria-hidden="true"] { opacity: 0.15; }
277284

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; }
293-
294285
/* --- Code blocks / pre elements --- */
295286
html.light pre[class*="font-mono"] {
296287
background-color: #1E1E2E;

0 commit comments

Comments
 (0)