From d7cada953c73d3ff8c1ef71b9af35a2463fa88d1 Mon Sep 17 00:00:00 2001 From: HomeDash Bot Date: Sat, 12 Sep 2026 18:00:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=E5=88=87=E6=8D=A2=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E8=8F=9C=E5=8D=95=E8=A2=AB=20overflow=20=E8=A3=81?= =?UTF-8?q?=E5=89=AA=EF=BC=88'=E7=82=B9=E4=BA=86=E6=B2=A1=E5=8F=8D?= =?UTF-8?q?=E5=BA=94'=E7=9C=9F=E5=9B=A0=EF=BC=89+=20=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8E=BB=E7=81=B0=E5=BA=95=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 真因(两条独立证据 + 像素证据): - 祖先链:.navi-view-switch{overflow:hidden} → .navi-dock{overflow:hidden}; - 菜单开/关截图像素比对有变化(确实在渲染),但菜单中心的 elementFromPoint 命中 #dashy → 超出 52×52 按钮盒的面板被裁剪,看不见也点不到; - 用户所称方形灰色背景即被裁剪后残留的菜单面板碎片。 此前我误判它'可见',因为 getBoundingClientRect 不受裁剪影响 —— 判据已改为像素比对 + 命中测试。 改动:.navi-dock/.navi-view-switch overflow:visible;.navi-view-menu z-index:1000 + pointer-events:auto;三个悬浮按钮去掉背景/描边/阴影(透明圆形), 仅在 hover/focus-visible 时给一层圆形淡染,点击不再出现方块高亮。 --- web/navi.css | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/web/navi.css b/web/navi.css index a3d4910..70c9d49 100644 --- a/web/navi.css +++ b/web/navi.css @@ -2252,3 +2252,48 @@ html[data-theme] body:has(.minimal-home) .navi-footer-host > .navi-footer > .nav html[data-theme] body:has(.minimal-home) .navi-footer-host > .navi-footer > .navi-footer-sep:last-of-type { display: none !important; } + +/* ═══ v73:修「切换视图菜单被裁剪」("点了没反应"的真因)+ 按钮去灰底板 ═══ + 实测证据: + ① 祖先链 .navi-view-switch{overflow:hidden} → .navi-dock{overflow:hidden} + ② 菜单开/关像素比对有变化(确实渲染),但中心 elementFromPoint 命中 #dashy + → 面板超出 52×52 按钮盒的部分被裁剪,既看不见也点不到。 + (注意:getBoundingClientRect 不受裁剪影响,所以此前我误判它"可见"。) + ③ 用户看到的那块"方形灰色背景"= 被裁剪后残留的菜单面板碎片。 + 修法:让承载菜单的 .navi-view-switch / .navi-dock 不裁剪,菜单抬到 z-index 1000。 */ +html[data-theme] body .navi-dock, +html[data-theme] body .navi-view-switch { + overflow: visible !important; +} +html[data-theme] body .navi-view-menu { + z-index: 1000 !important; + pointer-events: auto !important; +} + +/* 悬浮按钮:去掉"灰底板",仅悬停/聚焦时给一层圆形淡染(点击不再有方块高亮) */ +html[data-theme] body .navi-view-toggle, +html[data-theme] body .navi-admin-entry, +html[data-theme] body .navi-search-toggle { + background: transparent !important; + border: 0 !important; + box-shadow: none !important; + border-radius: 50% !important; +} +html[data-theme]:not(.navi-dark) body .navi-view-toggle, +html[data-theme]:not(.navi-dark) body .navi-admin-entry, +html[data-theme]:not(.navi-dark) body .navi-search-toggle { color: #475569 !important; } +html[data-theme]:not(.navi-dark) body .navi-view-toggle:hover, +html[data-theme]:not(.navi-dark) body .navi-view-toggle:focus-visible, +html[data-theme]:not(.navi-dark) body .navi-admin-entry:hover, +html[data-theme]:not(.navi-dark) body .navi-admin-entry:focus-visible, +html[data-theme]:not(.navi-dark) body .navi-search-toggle:hover { + background: rgba(100, 116, 139, 0.14) !important; + border-radius: 50% !important; + box-shadow: none !important; +} +html.navi-dark body .navi-view-toggle, +html.navi-dark body .navi-admin-entry, +html.navi-dark body .navi-search-toggle { color: #cbd5e1 !important; } +html.navi-dark body .navi-view-toggle:hover, +html.navi-dark body .navi-admin-entry:hover, +html.navi-dark body .navi-search-toggle:hover { background: rgba(148, 163, 184, 0.18) !important; border-radius: 50% !important; }