fix: update preview link color when link color setting changes

- Set --color-link directly in preview inline styles based on current theme
- Preview now shows the correct link color for the active theme
- Link color updates immediately when changed in settings
This commit is contained in:
Gigi
2025-11-07 22:39:22 +01:00
parent 55d14d9e77
commit 85d256b47b

View File

@@ -208,8 +208,9 @@ const ReadingDisplaySettings: React.FC<ReadingDisplaySettingsProps> = ({ setting
fontSize: `${settings.fontSize || 21}px`,
'--highlight-rgb': hexToRgb(settings.highlightColor || '#ffff00'),
'--paragraph-alignment': settings.paragraphAlignment || 'justify',
'--color-link-dark': settings.linkColorDark || '#38bdf8',
'--color-link-light': settings.linkColorLight || '#3b82f6'
'--color-link': isDark
? (settings.linkColorDark || '#38bdf8')
: (settings.linkColorLight || '#3b82f6')
} as React.CSSProperties}
>
<h3>The Quick Brown Fox</h3>