mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 06:34:24 +01:00
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:
@@ -208,8 +208,9 @@ const ReadingDisplaySettings: React.FC<ReadingDisplaySettingsProps> = ({ setting
|
|||||||
fontSize: `${settings.fontSize || 21}px`,
|
fontSize: `${settings.fontSize || 21}px`,
|
||||||
'--highlight-rgb': hexToRgb(settings.highlightColor || '#ffff00'),
|
'--highlight-rgb': hexToRgb(settings.highlightColor || '#ffff00'),
|
||||||
'--paragraph-alignment': settings.paragraphAlignment || 'justify',
|
'--paragraph-alignment': settings.paragraphAlignment || 'justify',
|
||||||
'--color-link-dark': settings.linkColorDark || '#38bdf8',
|
'--color-link': isDark
|
||||||
'--color-link-light': settings.linkColorLight || '#3b82f6'
|
? (settings.linkColorDark || '#38bdf8')
|
||||||
|
: (settings.linkColorLight || '#3b82f6')
|
||||||
} as React.CSSProperties}
|
} as React.CSSProperties}
|
||||||
>
|
>
|
||||||
<h3>The Quick Brown Fox</h3>
|
<h3>The Quick Brown Fox</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user