From 07d737af0f0bf7dc028e80424575ac0e98f9a391 Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 23 Jul 2026 16:18:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(markdown):=20=E4=BF=AE=E5=A4=8D=E7=AA=84?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=9C=A8=20table-wrap=20=E5=86=85=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E8=A2=AB=E8=A3=81=E5=88=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit overflow-x:auto 会强制 overflow-y 也建滚动盒,裁切 table 向外 spread 的 1px box-shadow 描边,导致不需要滚动的窄表格右下角边框断裂。 给 .table-wrap 加 padding:1px 为描边预留空间,负 margin:-1px 抵消外部尺寸 偏移,使 wrap 不撑大父容器、左上仍贴齐正文边缘。 --- input.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/input.css b/input.css index 44efdbf..c42ad1b 100644 --- a/input.css +++ b/input.css @@ -584,8 +584,13 @@ } /* table-wrap:渲染器给宽表格套的滚动容器,移动端窄屏可横向滚动。 - (见 src/api/markdown.rs::wrap_tables)。min-width 让窄表仍撑满、宽表撑开触发滚动。 */ + (见 src/api/markdown.rs::wrap_tables)。min-width 让窄表仍撑满、宽表撑开触发滚动。 + padding 为 table 的 1px box-shadow 描边预留空间:overflow 容器(overflow-x:auto 会 + 强制 overflow-y 也建滚动盒)会裁切向外 spread 的阴影,导致右下边框断裂。 + 负 margin 抵消 padding 的外部尺寸,使 wrap 不撑大父容器、左上仍贴齐正文边缘。 */ .md-content .table-wrap { + margin: -1px; + padding: 1px; overflow-x: auto; -webkit-overflow-scrolling: touch; }