Fix invisible borders on Rem and Ram themes
Both themes set borderColor == baseBackground in their IDE editor-scheme override (a seamless look for code editors). For the web UI secondary colour, fall back to secondaryBackground when borderColor would match the page background exactly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-1
@@ -79,8 +79,14 @@ export function buildVariables(theme: ThemeConfig): Record<string, string> {
|
|||||||
const isDark = theme.colorScheme === 'dark';
|
const isDark = theme.colorScheme === 'dark';
|
||||||
|
|
||||||
const primary = get(p, 'accentColor');
|
const primary = get(p, 'accentColor');
|
||||||
const secondary = get(p, 'borderColor', get(p, 'secondaryBackground'));
|
|
||||||
const body = get(p, 'baseBackground');
|
const body = get(p, 'baseBackground');
|
||||||
|
// Some themes (e.g. Rem, Ram) set borderColor == baseBackground in their IDE
|
||||||
|
// editor-scheme override, creating an invisible-border effect suited for IDE
|
||||||
|
// editors but unusable in a web UI. Fall back to secondaryBackground instead.
|
||||||
|
const rawSecondary = get(p, 'borderColor', get(p, 'secondaryBackground'));
|
||||||
|
const secondary = rawSecondary === body
|
||||||
|
? get(p, 'secondaryBackground', scaleLightness(body, isDark ? 0.08 : -0.08))
|
||||||
|
: rawSecondary;
|
||||||
const fg = get(p, 'foregroundColor');
|
const fg = get(p, 'foregroundColor');
|
||||||
const headerColor = get(p, 'headerColor');
|
const headerColor = get(p, 'headerColor');
|
||||||
const contrastColor = get(p, 'contrastColor');
|
const contrastColor = get(p, 'contrastColor');
|
||||||
|
|||||||
Reference in New Issue
Block a user