From 73c1ecf8a97e27875c42ddee73c1274be0e1340c Mon Sep 17 00:00:00 2001 From: lucaronin Date: Sun, 12 Apr 2026 22:51:32 +0200 Subject: [PATCH] fix: use muted editor code surfaces --- src/hooks/useTheme.test.ts | 16 ++++++++++++++++ src/theme.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/hooks/useTheme.test.ts diff --git a/src/hooks/useTheme.test.ts b/src/hooks/useTheme.test.ts new file mode 100644 index 00000000..f39b68af --- /dev/null +++ b/src/hooks/useTheme.test.ts @@ -0,0 +1,16 @@ +import { describe, expect, it } from 'vitest' +import { renderHook } from '@testing-library/react' +import { useEditorTheme } from './useTheme' + +describe('useEditorTheme', () => { + it('uses the muted editor surface for inline and block code', () => { + const { result } = renderHook(() => useEditorTheme()) + + expect(result.current.cssVars['--inline-styles-code-background-color']).toBe( + 'var(--bg-hover-subtle)' + ) + expect(result.current.cssVars['--code-blocks-background-color']).toBe( + 'var(--bg-hover-subtle)' + ) + }) +}) diff --git a/src/theme.json b/src/theme.json index 752c42e6..04a69b07 100644 --- a/src/theme.json +++ b/src/theme.json @@ -100,7 +100,7 @@ "fontFamily": "'SF Mono', 'Fira Code', monospace", "fontSize": 13, "lineHeight": 1.5, - "backgroundColor": "var(--bg-card)", + "backgroundColor": "var(--bg-hover-subtle)", "paddingHorizontal": 16, "paddingVertical": 12, "borderRadius": 6,