From 3d0b59f413ca686645c3b4436296f2478b6d5384 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 14 May 2025 20:46:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20katex=20block=20overflow?= =?UTF-8?q?=20(#2138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/compiled/main.css | 7 +++++++ assets/css/main.css | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 817ee1e9..ab9b80f8 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1344,6 +1344,9 @@ body.zen-mode-enable { .shrink-0 { flex-shrink: 0; } + .flex-grow { + flex-grow: 1; + } .grow { flex-grow: 1; } @@ -3610,6 +3613,10 @@ body a, body button { .katex-display { overflow: auto hidden; } +.katex-display { + padding-right: 2px; + width: calc(100% - 2px); +} table { display: block; overflow: auto; diff --git a/assets/css/main.css b/assets/css/main.css index d03c0015..18905d25 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -107,6 +107,12 @@ body button { /* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */ .katex-display { overflow: auto hidden } +/* Fix katex overflow https://github.com/nunocoracao/blowfish/issues/2138 */ +.katex-display { + padding-right: 2px; + width: calc(100% - 2px); +} + /* Fix long tables breaking out of article on mobile */ table { display: block;