iter(g306): 淡底浓度纳入表面审计

This commit is contained in:
HIsheR
2026-10-27 00:35:35 +08:00
parent 94c7818a50
commit 0ce51ebc28
3 changed files with 12 additions and 1 deletions
+9
View File
@@ -3140,6 +3140,15 @@
"motivation": "库里有 grid(等宽等高的规则栅格)与 space(线性间距),但图片墙、评论流、看板这类「列高不等」的布局没有落点,业务侧只能自己写 column-width 与 break-inside,还要记住多列容器不能是 flex/grid 这个坑。",
"acceptance": "① masonry({ items, columns?, minColumnWidth?, gap? }) 走 CSS 多列:不传 columns 按 minColumnWidth 自适应,传了即固定列数;② 每项包 .ua-masonry-item 并 break-inside: avoid,卡片不在列边界拆断;③ gap 同时管列间距与行间距;④ 样式只消费 --ua-* 令牌,禁止新增硬编码阴影/时长/字号;⑤ manifest/docs/README/demo/llms-full 同步,组件 88→89,npm run check 全绿。",
"notes": "新增 src/masonry.ts(22 行)+ types + index + ui.css 两条;CSS 多列实现:不传 columns 走 column-width 自适应,传了即 column-count 固定列数,gap 一处同时给 column-gap 与 item margin-bottom,item 带 break-inside: avoid;组件 88→89,README/AGENTS/ARCHITECTURE 计数与 docs 同步"
},
{
"id": "g306",
"domain": "tooling",
"status": "open",
"title": "淡底也进审计:选中底 / 悬停底的浓度不能再被悄悄调没",
"motivation": "audit:surface 只验表面阶梯(surface 各档),但全站 52 处选中底与悬停底用的是半透明 accent 淡底(tint-accent / -weak)——浓度手写在令牌里,暗色弱档降到 2% 时悬停与静止只差 1.026,界面「看起来没反应」,而现有门禁一声不响。",
"acceptance": "① LADDER 增加两档「表面 → 淡底标准档 / 弱档」,阈值 1.04,用 ratio() 先把半透明淡底压到表面上再算;② 四套主题全绿(亮 1.156 / 1.074,暗 1.232 / 1.118);③ 负向自检:暗色弱档改 2% 时 audit:surface 退出码 1 并点出 dark / contrastDark 两处;④ AGENTS 对该门禁的描述同步。",
"notes": ""
}
]
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -9,6 +9,8 @@ export const LADDER = [
{ label: '表面 → 悬停底', from: 'surface', to: 'surface-2', min: 1.04 }, // 悬停必须有反馈,低一档就白改
{ label: '悬停底 → 按下底', from: 'surface-2', to: 'surface-3', min: 1.04 }, // 按下要比悬停更实,两档不能糊在一起
{ label: '表面 → 凹陷底', from: 'surface', to: 'surface-inset', min: 1.02 }, // 凹陷区自带边框与内阴影,可放宽一档
{ label: '表面 → 淡底标准档', from: 'surface', to: 'tint-accent', min: 1.04 }, // 选中项底:半透明 accent 压在表面上,浓度调低即看不出「选中」
{ label: '表面 → 淡底弱档', from: 'surface', to: 'tint-accent-weak', min: 1.04 }, // 悬停底(列表 / 选项 / 行):比标准档更弱,最容易被调到看不见
];
/*** 作用:按四套主题(亮 / 暗 × 常规 / 高对比)逐档算亮度比,返回明细与未达标项 ***/