token 文件
.web/tokens.json 独立于 .web/site.yaml。
| 形状 | 作用 |
|---|---|
| 顶层 CSS custom-property 值 | 浅色/默认 token 层 |
dark 对象 | dark-mode 覆盖层 |
runtime 默认 --ds-* 值 | site 可以覆盖的基础 design system token |
应把它当作受信任配置。reader 会过滤一些明显 style/script-injection 模式,但它不是不可信 CSS sandbox。
theme 配置
site.yaml 可以用 theme: 块表达 shared theme-library opt-in 与 AUP CSS tone/palette 值。它当前不会让 .web/themes/<name>/ 目录成为 active component overlay。命名的 local theme tree 与 shared-library fallback 也有不同优先级;具体 target setup 未测试前,新站点不应混用它们。
大体上,本地 .web/themes/ tree 对 token/SEO inheritance 的影响可能不同于 shared library fallback,而 template structure 仍是 site-layer-first。第一版站点不应依赖这种细微 cascade;把 token 放在一份明确的 site-owned 文件中,并审阅渲染结果。
编写指南见 主题与 tokens。本参考无法解决的设计问题,先核验目标 setup,不要猜测出一个 theme contract。