From 12daefdf54961a07fdc158399ee106efec49bbae Mon Sep 17 00:00:00 2001 From: Cats Juice Date: Mon, 29 Sep 2025 10:25:31 +0800 Subject: [PATCH] fix(core): prevent emoji being clipped and adjust icon-picker default color (#13664) ## Summary by CodeRabbit - Style - Updated icon picker to use the primary icon color, improving visual consistency (including SVG icons). - Improved emoji rendering in the document icon picker by applying an emoji-specific font for elements marked as emoji, matching existing size and line-height. --- .../component/src/ui/icon-name-editor/icon-name-editor.css.ts | 1 + .../src/blocksuite/block-suite-editor/doc-icon-picker.css.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/frontend/component/src/ui/icon-name-editor/icon-name-editor.css.ts b/packages/frontend/component/src/ui/icon-name-editor/icon-name-editor.css.ts index 89aa208ad..fdc18aa97 100644 --- a/packages/frontend/component/src/ui/icon-name-editor/icon-name-editor.css.ts +++ b/packages/frontend/component/src/ui/icon-name-editor/icon-name-editor.css.ts @@ -16,6 +16,7 @@ export const contentRoot = style({ export const iconPicker = style({ padding: 0, lineHeight: 1, + color: cssVarV2.icon.primary, }); globalStyle(`${iconPicker} span:has(svg)`, { lineHeight: 0, diff --git a/packages/frontend/core/src/blocksuite/block-suite-editor/doc-icon-picker.css.ts b/packages/frontend/core/src/blocksuite/block-suite-editor/doc-icon-picker.css.ts index 6711032de..2addcad78 100644 --- a/packages/frontend/core/src/blocksuite/block-suite-editor/doc-icon-picker.css.ts +++ b/packages/frontend/core/src/blocksuite/block-suite-editor/doc-icon-picker.css.ts @@ -10,6 +10,9 @@ export const docIconPickerTrigger = style({ fontSize: 60, lineHeight: 1, }, + '&[data-icon-type="emoji"]': { + fontFamily: 'emoji', + }, }, });