From cf5dbfb028e5c95dcdfcaf8143d8f3d5ee1e750b Mon Sep 17 00:00:00 2001 From: Codex Bot Date: Thu, 12 Nov 2026 18:43:58 +0800 Subject: [PATCH] docs(styles): clarify global cascade and responsive behavior --- src/styles/globals.css | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/styles/globals.css b/src/styles/globals.css index 669a437..28f62b5 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -61,7 +61,7 @@ a { color 0.2s, transform 0.2s; } -/* 普通按钮用 pointer;默认 disabled 为 wait,局部不可用按钮可覆盖成 not-allowed。 */ +/* 普通按钮用 pointer;默认 disabled 为 wait,局部不可用按钮可覆盖成 not-allowed。wait 只是光标外观,不能据此判断按钮正在执行异步任务。 */ button { cursor: pointer; } @@ -1332,7 +1332,7 @@ form label { min-height: 100dvh; flex: 1; } -/* 根据实际 DOM 是否存在全局侧栏选择主区偏移,不能仅从业务开关推断此选择器已匹配。 */ +/* 根据实际 DOM 是否存在全局侧栏选择主区偏移,不能仅从业务开关推断此选择器已匹配。display:none 不会让元素从 :has() 中消失;窄屏偏移由后面的更具体规则另行覆盖。 */ .dashboard:not(:has(.workspace-sidebar)) .workspace-main { margin-left: 48px; width: calc(100% - 48px); @@ -2961,7 +2961,7 @@ form label { font-size: 7px; } } -/* 全局减少动态效果:关闭平滑滚动,并以 important 关闭元素及伪元素的 animation/transition。 */ +/* 全局减少动态效果:关闭平滑滚动,并以 important 关闭元素及伪元素的 CSS animation/transition;不停止 JavaScript 的 RAF、定时器或业务任务。 */ @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; @@ -2978,7 +2978,7 @@ form label { a.bg-primary { color: #fff9f4; } -/* 后置覆盖把导航改为 auto/1fr/auto 三列 grid;没有重置前面媒体查询的 padding/height。 */ +/* 后置覆盖把导航改为 auto/1fr/auto 三列 grid;没有重置前面媒体查询的 padding/height。未指定 grid-column,隐藏 nav 后剩余项按自动放置规则占列,不能只凭三列声明推断动作始终在第三列。 */ .site-nav { display: grid; grid-template-columns: auto 1fr auto; @@ -3040,7 +3040,6 @@ a.bg-primary { line-height: 1.8; } -/* Keep the sidebar-only dashboard accessible at narrow viewport widths. */ /* 侧栏专用页面后置恢复 display:block,覆盖窄屏的全局侧栏隐藏规则,并给 48px 图标轨留空间。 */ .sidebar-only .workspace-sidebar { display: block;