fix: migrate hardcoded hex values to CSS vars for light mode

Replace dark hex values with CSS custom properties across all panel,
card, modal, and focus components so light mode renders correctly.
Backgrounds, borders, and text colors now respond to data-theme attribute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
“BeeRad”
2026-03-17 20:15:24 +11:00
co-authored by Claude Sonnet 4.6
parent bf175ad125
commit ffefc7b332
19 changed files with 474 additions and 474 deletions
+30 -30
View File
@@ -108,25 +108,25 @@ export default function GuidesPane({
style={{
background: 'none',
border: 'none',
color: '#888',
color: 'var(--rah-text-muted)',
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
padding: '4px',
borderRadius: '4px',
}}
onMouseEnter={e => { e.currentTarget.style.color = '#ccc'; }}
onMouseLeave={e => { e.currentTarget.style.color = '#888'; }}
onMouseEnter={e => { e.currentTarget.style.color = 'var(--rah-text-secondary)'; }}
onMouseLeave={e => { e.currentTarget.style.color = 'var(--rah-text-muted)'; }}
>
<ArrowLeft size={16} />
</button>
<span style={{ color: '#ccc', fontSize: '13px', fontWeight: 500, display: 'flex', alignItems: 'center', gap: '4px' }}>
<span style={{ color: 'var(--rah-text-secondary)', fontSize: '13px', fontWeight: 500, display: 'flex', alignItems: 'center', gap: '4px' }}>
{selectedGuide.immutable && <Lock size={12} style={{ color: '#22c55e' }} />}
{selectedGuide.name}
</span>
</div>
) : (
<span style={{ color: '#666', fontSize: '11px' }}>
<span style={{ color: 'var(--rah-text-muted)', fontSize: '11px' }}>
{userGuides.length} of 10 custom guides
</span>
)}
@@ -134,22 +134,22 @@ export default function GuidesPane({
<div style={{ flex: 1, minHeight: 0, overflow: 'auto', padding: '12px' }}>
{loading ? (
<div style={{ color: '#555', fontSize: '13px', textAlign: 'center', paddingTop: '24px' }}>
<div style={{ color: 'var(--rah-text-muted)', fontSize: '13px', textAlign: 'center', paddingTop: '24px' }}>
Loading...
</div>
) : selectedGuide ? (
<div className="guide-content" style={{ color: '#ccc', fontSize: '13px', lineHeight: '1.6' }}>
<div className="guide-content" style={{ color: 'var(--rah-text-secondary)', fontSize: '13px', lineHeight: '1.6' }}>
<ReactMarkdown
remarkPlugins={[remarkGfm]}
components={{
h1: ({ children }) => (
<h1 style={{ fontSize: '18px', fontWeight: 600, color: '#eee', margin: '0 0 16px 0' }}>{children}</h1>
<h1 style={{ fontSize: '18px', fontWeight: 600, color: 'var(--rah-text-base)', margin: '0 0 16px 0' }}>{children}</h1>
),
h2: ({ children }) => (
<h2 style={{ fontSize: '15px', fontWeight: 600, color: '#ddd', margin: '20px 0 8px 0' }}>{children}</h2>
<h2 style={{ fontSize: '15px', fontWeight: 600, color: 'var(--rah-text-base)', margin: '20px 0 8px 0' }}>{children}</h2>
),
h3: ({ children }) => (
<h3 style={{ fontSize: '14px', fontWeight: 600, color: '#ccc', margin: '16px 0 6px 0' }}>{children}</h3>
<h3 style={{ fontSize: '14px', fontWeight: 600, color: 'var(--rah-text-secondary)', margin: '16px 0 6px 0' }}>{children}</h3>
),
p: ({ children }) => (
<p style={{ margin: '0 0 12px 0' }}>{children}</p>
@@ -168,7 +168,7 @@ export default function GuidesPane({
if (isInline) {
return (
<code style={{
background: '#1a1a1a',
background: 'var(--rah-bg-active)',
padding: '2px 6px',
borderRadius: '4px',
fontSize: '12px',
@@ -179,13 +179,13 @@ export default function GuidesPane({
return (
<code style={{
display: 'block',
background: '#0d0d0d',
background: 'var(--rah-bg-surface)',
padding: '12px',
borderRadius: '6px',
fontSize: '12px',
overflowX: 'auto',
margin: '0 0 12px 0',
color: '#aaa',
color: 'var(--rah-text-muted)',
whiteSpace: 'pre-wrap',
}} {...props}>{children}</code>
);
@@ -194,17 +194,17 @@ export default function GuidesPane({
<pre style={{ margin: '0 0 12px 0' }}>{children}</pre>
),
strong: ({ children }) => (
<strong style={{ color: '#eee', fontWeight: 600 }}>{children}</strong>
<strong style={{ color: 'var(--rah-text-base)', fontWeight: 600 }}>{children}</strong>
),
hr: () => (
<hr style={{ border: 'none', borderTop: '1px solid #2a2a2a', margin: '16px 0' }} />
<hr style={{ border: 'none', borderTop: '1px solid var(--rah-border-strong)', margin: '16px 0' }} />
),
blockquote: ({ children }) => (
<blockquote style={{
borderLeft: '3px solid #333',
borderLeft: '1px solid var(--rah-border-stronger)',
paddingLeft: '12px',
margin: '0 0 12px 0',
color: '#999',
color: 'var(--rah-text-muted)',
}}>{children}</blockquote>
),
}}
@@ -215,13 +215,13 @@ export default function GuidesPane({
) : (
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
{guides.length === 0 ? (
<div style={{ color: '#555', fontSize: '13px', textAlign: 'center', paddingTop: '24px' }}>
<div style={{ color: 'var(--rah-text-muted)', fontSize: '13px', textAlign: 'center', paddingTop: '24px' }}>
No guides found
</div>
) : (
<>
{systemGuides.length > 0 && (
<div style={{ color: '#555', fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.5px', padding: '4px 0' }}>
<div style={{ color: 'var(--rah-text-muted)', fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.5px', padding: '4px 0' }}>
System Guides
</div>
)}
@@ -235,7 +235,7 @@ export default function GuidesPane({
/>
))}
{userGuides.length > 0 && (
<div style={{ color: '#555', fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.5px', padding: '8px 0 4px 0' }}>
<div style={{ color: 'var(--rah-text-muted)', fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.5px', padding: '8px 0 4px 0' }}>
Custom Guides
</div>
)}
@@ -276,30 +276,30 @@ function GuideCard({
alignItems: 'center',
gap: '8px',
padding: '12px',
background: '#161616',
border: '1px solid #222',
background: 'var(--rah-bg-elevated)',
border: '1px solid var(--rah-bg-active)',
borderRadius: '8px',
cursor: 'pointer',
textAlign: 'left',
transition: 'all 0.15s ease',
}}
onMouseEnter={e => {
e.currentTarget.style.background = '#1a1a1a';
e.currentTarget.style.borderColor = '#333';
e.currentTarget.style.background = 'var(--rah-bg-active)';
e.currentTarget.style.borderColor = 'var(--rah-border-stronger)';
}}
onMouseLeave={e => {
e.currentTarget.style.background = '#161616';
e.currentTarget.style.borderColor = '#222';
e.currentTarget.style.background = 'var(--rah-bg-elevated)';
e.currentTarget.style.borderColor = 'var(--rah-bg-active)';
}}
>
{guide.immutable && (
<Lock size={12} style={{ color: '#22c55e', flexShrink: 0 }} />
)}
<div style={{ flex: 1, minWidth: 0 }}>
<span style={{ color: '#ddd', fontSize: '13px', fontWeight: 500 }}>
<span style={{ color: 'var(--rah-text-base)', fontSize: '13px', fontWeight: 500 }}>
{guide.name}
</span>
<span style={{ color: '#777', fontSize: '12px', lineHeight: '1.4', display: 'block', marginTop: '2px' }}>
<span style={{ color: 'var(--rah-text-muted)', fontSize: '12px', lineHeight: '1.4', display: 'block', marginTop: '2px' }}>
{guide.description}
</span>
</div>
@@ -310,7 +310,7 @@ function GuideCard({
style={{
background: 'none',
border: 'none',
color: '#555',
color: 'var(--rah-text-muted)',
cursor: 'pointer',
padding: '4px',
borderRadius: '4px',
@@ -320,7 +320,7 @@ function GuideCard({
opacity: deleting === guide.name ? 0.3 : 1,
}}
onMouseEnter={e => { e.currentTarget.style.color = '#ef4444'; }}
onMouseLeave={e => { e.currentTarget.style.color = '#555'; }}
onMouseLeave={e => { e.currentTarget.style.color = 'var(--rah-text-muted)'; }}
>
<Trash2 size={14} />
</button>