diff --git a/.changeset/hot-pets-march.md b/.changeset/hot-pets-march.md new file mode 100644 index 0000000..2c8bcde --- /dev/null +++ b/.changeset/hot-pets-march.md @@ -0,0 +1,5 @@ +--- +'anki-templates': patch +--- + +Enable scroll for long formula (长公式启用滚动) diff --git a/src/components/field.tsx b/src/components/field.tsx index 8b1060f..ee7b6be 100644 --- a/src/components/field.tsx +++ b/src/components/field.tsx @@ -39,9 +39,9 @@ export const AnkiField: FC<{ ref={attachNode} id={`anki-field-${name}`} className={clsx( - 'anki-field overflow-x-hidden', - 'prose prose-neutral', - 'dark:prose-invert', + 'anki-field', + 'overflow-x-auto', + 'prose prose-neutral dark:prose-invert', styleId, className, )} diff --git a/src/global.css b/src/global.css index 5e07e13..540f65b 100644 --- a/src/global.css +++ b/src/global.css @@ -18,3 +18,11 @@ body { .anki-field p:last-child { margin-bottom: 0 !important; } + +.anki-field { + scrollbar-width: none; +} + +.anki-field::-webkit-scrollbar { + scrollbar-width: none; +}