Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(editor): horizontal scroll bar missing in code block (#10742)

L-Sunc378a8a3ad69
diff --git a/blocksuite/affine/blocks/block-code/src/styles.ts b/blocksuite/affine/blocks/block-code/src/styles.ts
index 118f88fc57..bde3d54793 100644
--- a/blocksuite/affine/blocks/block-code/src/styles.ts
+++ b/blocksuite/affine/blocks/block-code/src/styles.ts
@@ -1,3 +1,4 @@
+import { scrollbarStyle } from '@blocksuite/affine-shared/styles';
import { css } from 'lit';
export const codeBlockStyles = css`
@@ -15,9 +16,7 @@ export const codeBlockStyles = css`
padding: 12px;
}
- .affine-code-block-container rich-text {
- overflow-x: hidden;
- }
+ ${scrollbarStyle('.affine-code-block-container rich-text')}
.affine-code-block-container .inline-editor {
font-family: var(--affine-font-code-family);