From 0e3536fa0c81b714f5bc160c5d5e818618cd72b1 Mon Sep 17 00:00:00 2001 From: ikkz Date: Fri, 22 Nov 2024 23:46:52 +0800 Subject: [PATCH 1/2] fix: enable scorll for long formula --- .changeset/hot-pets-march.md | 5 +++++ src/components/field.tsx | 6 +++--- src/global.css | 8 ++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .changeset/hot-pets-march.md diff --git a/.changeset/hot-pets-march.md b/.changeset/hot-pets-march.md new file mode 100644 index 0000000..a230aea --- /dev/null +++ b/.changeset/hot-pets-march.md @@ -0,0 +1,5 @@ +--- +'anki-templates': patch +--- + +Enable scorll 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; +} From 1e83fb6db3a55feae566d63f5fed724c49572c3b Mon Sep 17 00:00:00 2001 From: ikkz Date: Sat, 23 Nov 2024 01:00:02 +0800 Subject: [PATCH 2/2] fix: typo --- .changeset/hot-pets-march.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/hot-pets-march.md b/.changeset/hot-pets-march.md index a230aea..2c8bcde 100644 --- a/.changeset/hot-pets-march.md +++ b/.changeset/hot-pets-march.md @@ -2,4 +2,4 @@ 'anki-templates': patch --- -Enable scorll for long formula (长公式启用滚动) +Enable scroll for long formula (长公式启用滚动)