From e3770cd10a2a1ef24fcf3adcc775cb91d9f25143 Mon Sep 17 00:00:00 2001 From: HomeDash Bot Date: Sat, 12 Sep 2026 18:54:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=20v79=20=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E4=B8=89=E8=A1=8C=E9=97=AE=E9=A2=98=EF=BC=88=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=88=86=E9=9A=94=E7=AC=A6=E4=BB=8D=E5=8D=A0=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E6=A0=BC=E4=BD=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实测 v79:grid 算成 3 行(y=671/688/705),左列多出一行。 原因:.navi-footer-sep 虽设 display:none,但被更高特异性规则压过, 仍占据 grid 第 2 行格位,把「豫公网安备」挤到第 3 行。 修法:同级别选择器彻底隐藏分隔符(display:none + 绝对定位移出流外), 并用 grid-column/grid-row 显式定位:左列 1/2 行 = 两个备案号, 右列 1/2 行 = 两句座右铭;grid-auto-rows:0 防止隐式行撑高。 --- web/navi.css | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/web/navi.css b/web/navi.css index 96cde94..e318460 100644 --- a/web/navi.css +++ b/web/navi.css @@ -2401,3 +2401,31 @@ html[data-theme] .navi-footer > .navi-footer-sep { display: none !important; } /* 页脚容器高度需容纳两行;给内容框留出足够空间 */ html[data-theme] body:has(.minimal-home) .navi-footer-host { height: auto !important; max-height: none !important; } html[data-theme] .minimal-home > .item-group-container { margin-bottom: 40px !important; } + +/* ═══ v80:修 v79 的三行问题(隐藏的分隔符仍占网格格位)═══ + 实测:grid 计算为 3 行(y=671/688/705),原因是 .navi-footer-sep + 虽设 display:none 但被更高特异性规则压过,仍占据第 2 行格位, + 使「豫公网安备」落到第 3 行(应为第 2 行)。 + 修法:用与 grid 定义同级别的选择器彻底隐藏分隔符,并用 grid-row 显式定位, + 确保左列两行=两个备案、右列两行=两句座右铭。 */ +html[data-theme] body:has(.minimal-home) .navi-footer-host > .navi-footer > .navi-footer-sep, +html[data-theme] body:not(:has(.minimal-home)) footer > .navi-footer > .navi-footer-sep, +html[data-theme] body .navi-footer > .navi-footer-sep { + display: none !important; + position: absolute !important; left: -9999px !important; width: 0 !important; height: 0 !important; + overflow: hidden !important; +} +/* 显式定位:左列第1/2行 = 两个备案;右列第1/2行 = 两句一言 */ +html[data-theme] body:has(.minimal-home) .navi-footer-host > .navi-footer > a:nth-of-type(1), +html[data-theme] body .navi-footer > a:nth-of-type(1), +html[data-theme] body:not(:has(.minimal-home)) footer > .navi-footer > a:nth-of-type(1) { + grid-column: 1 !important; grid-row: 1 !important; justify-self: start !important; +} +html[data-theme] body:has(.minimal-home) .navi-footer-host > .navi-footer > a:nth-of-type(2), +html[data-theme] body .navi-footer > a:nth-of-type(2), +html[data-theme] body:not(:has(.minimal-home)) footer > .navi-footer > a:nth-of-type(2) { + grid-column: 1 !important; grid-row: 2 !important; justify-self: start !important; +} +html[data-theme] body .navi-footer > .navi-quote:nth-last-of-type(2) { grid-column: 2 !important; grid-row: 1 !important; justify-self: end !important; } +html[data-theme] body .navi-footer > .navi-quote:last-of-type { grid-column: 2 !important; grid-row: 2 !important; justify-self: end !important; } +html[data-theme] .navi-footer { grid-template-rows: auto auto !important; grid-auto-rows: 0 !important; }