From b6dd8129eab4999713c5c0016e61e1076e4cf0c4 Mon Sep 17 00:00:00 2001 From: kl Date: Wed, 11 Mar 2026 20:37:01 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=20OFD=20?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=BA=A2=E5=87=BA=E4=BF=AE=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=20-=20=E4=BB=85=E8=A6=86=E7=9B=96=E6=9C=89?= =?UTF-8?q?=20inline=20style=20=E7=9A=84=20SVG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 采纳 Copilot 的建议,改用更精准的选择器 #content svg[style="overflow:visible"]。 这样可以只覆盖有 inline style overflow:visible 的 SVG 容器,避免影响其他 已有 overflow:hidden 的元素。保留完整的注释说明问题根因和解决方案。 Ref: Copilot suggestion on PR #723 --- server/src/main/resources/static/ofd/css/cnofd.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/src/main/resources/static/ofd/css/cnofd.css b/server/src/main/resources/static/ofd/css/cnofd.css index a8079550..a46d0145 100644 --- a/server/src/main/resources/static/ofd/css/cnofd.css +++ b/server/src/main/resources/static/ofd/css/cnofd.css @@ -203,9 +203,10 @@ body { margin: 0; } } /* OFD 表格竖线溢出修复 */ -/* cnofd 库在 SVG 上设置了 inline style overflow:visible,导致表格中间竖线的 */ -/* path 元素超出 SVG 容器高度后仍然可见。使用 !important 覆盖 inline style。 */ -#content svg { +/* 问题:cnofd 库为表格竖线创建的 SVG 容器设置了 inline style overflow:visible, + 导致 元素超过容器高度而溢出表格底部边框。 */ +/* 解决方案:精准覆盖有 inline style 的 SVG,使用 !important 强制覆盖 inline style。 */ +#content svg[style="overflow:visible"] { overflow: hidden !important; }