Skip to content

Commit 36fa735

Browse files
fix(agent): force code block text to white using !important CSS class
1 parent a43668c commit 36fa735

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

demo-web/src/app/agent/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ export default function AgentPage() {
136136
<div className="w-3 h-3 rounded-full bg-green-500/80"></div>
137137
</div>
138138
</div>
139-
<pre className="p-4 overflow-x-auto bg-[#0d1117] m-0" style={{ color: '#ffffff' }}>
140-
<code className="text-[13px] font-mono leading-relaxed whitespace-pre-wrap" style={{ color: '#ffffff' }} {...props} />
139+
<pre className="code-block-white p-4 overflow-x-auto bg-[#0d1117] m-0">
140+
<code className="text-[13px] font-mono leading-relaxed whitespace-pre-wrap" {...props} />
141141
</pre>
142142
</div>
143143
),

demo-web/src/app/globals.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,10 @@
123123
body {
124124
@apply bg-background text-foreground;
125125
}
126+
}
127+
128+
/* Force all text inside code blocks to pure white, overriding any syntax-highlighting spans */
129+
.code-block-white,
130+
.code-block-white * {
131+
color: #ffffff !important;
126132
}

0 commit comments

Comments
 (0)