fix(ui): 源头修复「切换视图菜单被裁剪」—— 排除导航控件子树
真因(已定位到具体规则与行号):
navi.css 729-730 行(v60 为修 flex 压缩链而写)
html[data-theme] body:has(.minimal-home) > div,
html[data-theme] body:has(.minimal-home) > div > div { … overflow: hidden !important }
匹配了 body 下所有 div 与 div>div,因此:
.navi-dock(body 直接子元素)、.navi-view-switch 也被设成
overflow:hidden + display:flex + column + max-height:100%。
菜单(.navi-view-menu)是 .navi-view-switch 的子元素,超出 52×52 盒的部分被裁剪,
只露一条缝:像素比对证明它在渲染,但中心 elementFromPoint 命中 #dashy,
三个选项全部点不到 → 用户观感点了没反应,残留碎片即方形灰色背景。
先前 v73 的覆盖选择器特异性不足(0,2,2 < 该规则的 0,2,3 起),故无效。
修法:在该规则上加 :not(.navi-dock):not(.navi-view-switch):not(.navi-view-menu),
不动其它内容链行为。配套 v73 的 overflow:visible/z-index:1000 现已生效。
This commit is contained in:
11
web/navi.css
11
web/navi.css
@ -726,8 +726,15 @@ html[data-theme] body:has(.minimal-home) {
|
||||
flex-direction: column !important;
|
||||
}
|
||||
/* flex 链条上的中间 wrapper(Dashy 的 #app / 包装 div)必须允许压缩 */
|
||||
html[data-theme] body:has(.minimal-home) > div,
|
||||
html[data-theme] body:has(.minimal-home) > div > div {
|
||||
/* v74 修正:本规则本意是让 minimal 页的内容链可压缩(v60),
|
||||
但它匹配了 body 下**所有** div 与 div>div —— 于是把悬浮控件
|
||||
.navi-dock(body 直接子元素)与 .navi-view-switch 也设成了
|
||||
overflow:hidden + display:flex + flex-direction:column,
|
||||
导致"切换视图"菜单被裁剪:只露一条缝、中心点命中 #dashy、选项全都点不到
|
||||
(实测证据:祖先链 overflow=hidden + 开关像素比对有变化 + elementFromPoint 命中 #dashy)。
|
||||
故排除导航控件子树,其余保持原行为。 */
|
||||
html[data-theme] body:has(.minimal-home) > div:not(.navi-dock):not(.navi-view-switch):not(.navi-view-menu),
|
||||
html[data-theme] body:has(.minimal-home) > div > div:not(.navi-view-switch):not(.navi-view-menu):not(.navi-dock) {
|
||||
flex: 1 1 auto !important;
|
||||
min-height: 0 !important;
|
||||
max-height: 100% !important;
|
||||
|
||||
Reference in New Issue
Block a user