From 88339b4022528c611bb537469f2dbbb7bce30724 Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Wed, 28 May 2025 04:11:02 +0000 Subject: [PATCH] fix(editor): inline code style (#12585) Closes: #12576 Closes: [BS-2080](https://linear.app/affine-design/issue/BS-2080/update-inline-code-font-size) ## Summary by CodeRabbit - **Style** - Improved the appearance of code elements within lists by adjusting font size and padding. - Updated inline code styling for better vertical alignment and consistency with surrounding text. --- blocksuite/affine/blocks/list/src/styles.ts | 5 +++++ blocksuite/affine/shared/src/styles/text.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/blocksuite/affine/blocks/list/src/styles.ts b/blocksuite/affine/blocks/list/src/styles.ts index 08599f465..fcb9a689e 100644 --- a/blocksuite/affine/blocks/list/src/styles.ts +++ b/blocksuite/affine/blocks/list/src/styles.ts @@ -40,6 +40,11 @@ export const listBlockStyles = css` font-size: var(--affine-font-base); } + affine-list code { + font-size: calc(var(--affine-font-base) - 3px); + padding: 0px 4px 2px; + } + .affine-list-block-container { box-sizing: border-box; border-radius: 4px; diff --git a/blocksuite/affine/shared/src/styles/text.ts b/blocksuite/affine/shared/src/styles/text.ts index f0d6f7380..cfcc28033 100644 --- a/blocksuite/affine/shared/src/styles/text.ts +++ b/blocksuite/affine/shared/src/styles/text.ts @@ -23,7 +23,8 @@ export function affineTextStyles( 'border-radius': '4px', color: 'var(--affine-text-primary-color)', 'font-variant-ligatures': 'none', - 'line-height': 'auto', + 'vertical-align': 'bottom', + 'line-height': 'inherit', }; }