From 6ae6231d1fa745061808bf4873819d057aea5123 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sun, 9 Aug 2026 10:43:28 +0200 Subject: [PATCH] fix(app): prevent inline code from obscuring text Explicit inline-code line height creates oversized painted backgrounds when mixed markdown wraps on native. Let native font metrics determine the span height so adjacent lines remain visible. --- packages/app/src/styles/markdown-styles.test.ts | 4 ++-- packages/app/src/styles/markdown-styles.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/app/src/styles/markdown-styles.test.ts b/packages/app/src/styles/markdown-styles.test.ts index 3b728ce6d..44ae3791f 100644 --- a/packages/app/src/styles/markdown-styles.test.ts +++ b/packages/app/src/styles/markdown-styles.test.ts @@ -77,8 +77,8 @@ describe("createMarkdownStyles", () => { expect(styles.code_inline).toMatchObject({ fontFamily: darkTheme.fontFamily.mono, fontSize: darkTheme.fontSize.code, - lineHeight: Math.round(darkTheme.fontSize.code * 1.45), }); + expect(styles.code_inline).not.toHaveProperty("lineHeight"); expect(styles.code_block).toMatchObject({ fontFamily: darkTheme.fontFamily.mono, fontSize: darkTheme.fontSize.code, @@ -90,7 +90,7 @@ describe("createMarkdownStyles", () => { expect(compactStyles.code_inline).toMatchObject({ fontFamily: darkTheme.fontFamily.mono, fontSize: darkTheme.fontSize.code, - lineHeight: Math.round(darkTheme.fontSize.code * 1.45), }); + expect(compactStyles.code_inline).not.toHaveProperty("lineHeight"); }); }); diff --git a/packages/app/src/styles/markdown-styles.ts b/packages/app/src/styles/markdown-styles.ts index b7a185f1f..d7f78fb2a 100644 --- a/packages/app/src/styles/markdown-styles.ts +++ b/packages/app/src/styles/markdown-styles.ts @@ -172,7 +172,6 @@ export function createMarkdownStyles(theme: Theme) { borderWidth: 0, fontFamily: theme.fontFamily.mono, fontSize: theme.fontSize.code, - lineHeight: Math.round(theme.fontSize.code * 1.45), }, code_block: {