fix(ui): 修 v79 页脚三行问题(隐藏分隔符仍占网格格位)

实测 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 防止隐式行撑高。
This commit is contained in:
HomeDash Bot
2026-09-12 18:54:52 +08:00
parent 38467a1724
commit e3770cd10a

View File

@ -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; }