fix: replace bg-accent with neutral backgrounds on code/kbd elements
bg-accent maps to bright cyan (#22d3ee) in Tailwind v4 — wrong for code elements and keyboard shortcut badges. This was a recurring issue across the app where every backticked term glowed cyan. - Code blocks: bg-accent → bg-code (#14161e) - Inline code: bg-accent → bg-white/[0.08] (subtle neutral tint) - Kbd badges: bg-accent → bg-white/[0.08] - AI chat markdown: same fixes in MarkdownContent.tsx Cyan remains reserved for interactive elements (buttons, active nav, links) per the design system. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ export function MarkdownContent({ content, className }: MarkdownContentProps) {
|
||||
return (
|
||||
<code
|
||||
className={cn(
|
||||
'block rounded bg-accent p-3 font-mono text-sm overflow-x-auto',
|
||||
'block rounded bg-code p-3 font-mono text-sm text-foreground overflow-x-auto',
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
@@ -54,7 +54,7 @@ export function MarkdownContent({ content, className }: MarkdownContentProps) {
|
||||
}
|
||||
return (
|
||||
<code
|
||||
className="rounded bg-accent px-1.5 py-0.5 font-mono text-sm"
|
||||
className="rounded bg-white/[0.08] px-1.5 py-0.5 font-mono text-sm text-secondary"
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
@@ -63,7 +63,7 @@ export function MarkdownContent({ content, className }: MarkdownContentProps) {
|
||||
},
|
||||
// Style code blocks (pre)
|
||||
pre: ({ children }) => (
|
||||
<pre className="mb-3 overflow-x-auto rounded bg-accent p-0 last:mb-0">
|
||||
<pre className="mb-3 overflow-x-auto rounded bg-code p-0 last:mb-0">
|
||||
{children}
|
||||
</pre>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user