Bill
3b86d62111
fix(theme): --ot-* 变量名 camelCase/kebab-case 不匹配导致浅色分支静默失效
CSS 自定义属性名大小写敏感,而 semanticVars() 的键是 camelCase、样式表读的是
kebab-case:chrome.ts 直接写 `--ot-${key}` 时,9 个多词变量(--ot-text-muted、
--ot-text-secondary、--ot-surface-raised、--ot-border-strong、--ot-success-fg、
--ot-danger-fg、--ot-warning-fg、--ot-info-fg、--ot-scrollbar-active、
--ot-focus-ring)从未真正生效,元素一律回落到 global.css :root 的深色兜底值——
浅色主题正是靠这些变量修可读性的,等于白改(--ot-text-muted 48 处引用仍是
#8a8a8a,白底 3.25:1;--ot-danger-fg 仍是 #f85149,3.15:1)。
- 键 `muted` 改名 `textMuted`(CSS 读的是 --ot-text-muted)
- 新增 semantic.ts 的 cssVarName()/semanticCssVars(),chrome.ts 只调用它们,
命名逻辑单一来源
- 新增 tests/ot-var-names.mjs:把「CSS 引用名 = JS 写入名 = :root 声明名」
三集合锁在一起(值测试看不出这类问题),已用「去掉转换」验证会失败
- AGENTS/STATE 同步该铁律;测试数 22/25 的陈旧计数修正为实际的 29
2026-10-16 23:29:03 +08:00
..
2026-10-11 09:52:39 +08:00
2026-10-09 11:31:26 +08:00
2026-10-11 09:52:39 +08:00
2026-10-09 11:31:06 +08:00
2026-10-09 11:31:06 +08:00
2026-10-16 20:34:22 +08:00
2026-10-10 13:36:55 +08:00
2026-10-07 22:57:16 +08:00
2026-10-09 11:31:10 +08:00
2026-09-28 13:06:29 +08:00
2026-10-07 22:57:16 +08:00
2026-10-07 22:06:45 +08:00
2026-09-24 22:16:43 +08:00
2026-10-07 22:06:58 +08:00
2026-09-24 22:16:43 +08:00
2026-10-07 22:57:16 +08:00
2026-10-16 23:29:03 +08:00
2026-10-11 09:52:39 +08:00
2026-10-07 22:57:16 +08:00
2026-10-16 23:29:03 +08:00
2026-10-15 10:35:20 +08:00
2026-09-20 20:27:06 +08:00
2026-10-07 22:06:45 +08:00
2026-10-09 11:30:51 +08:00
2026-10-07 22:57:16 +08:00
2026-09-24 22:16:43 +08:00
2026-09-24 22:16:43 +08:00
2026-10-09 11:31:26 +08:00
2026-10-09 11:31:26 +08:00
2026-10-08 00:11:20 +08:00
2026-10-16 20:23:33 +08:00
2026-10-16 00:53:00 +08:00
2026-10-11 09:52:39 +08:00
2026-10-07 22:06:45 +08:00