feat(tokens): 新增 --iwb-accent-on-surface / --iwb-accent-tint 并接入生成链
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m27s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m27s
「强调色当文字用」以前各插件各自混色,暗色下对比度不足。现在固化成两个语义 token: - --iwb-accent-on-surface = color-mix(--iwb-brand 45%, --iwb-text):文字/图标用的安全强调色 - --iwb-accent-tint = color-mix(--iwb-brand 18%, transparent):选中标签/药丸的淡底 两者都是关系式(跟随主题与自定义强调色),不写死 hex 生成链:scripts/gen-tokens.js 的 LIGHT_ONLY 表 → src/design-tokens.css / dist/tokens.json (npm run tokens:write 重生成,tokens:check 守卫) 落地: - plugins/promptlib 1.14.7:参考图药丸改用这两个 token - style.css:质量档位选中态、右键菜单 hover 底改用这两个 token(顺手去掉两处散落的 12% mix) - docs/standards/design-tokens.md 新增 §3.9:取值、成对用法、四条规则(填充用 brand / 文字用 accent-on-surface 等)
This commit is contained in:
1 parent
73a56c60f2
commit
04cc527002
7 files changed
+39
-8
No files matched your search
@@ -199,6 +199,8 @@ const LIGHT_ONLY = [
|
||||
['--iwb-hr', 'color-mix(in srgb, var(--iwb-border) 50%, var(--iwb-border2) 50%)', '首页上的细分隔线'],
|
||||
['--iwb-dock-bg', 'color-mix(in srgb, var(--iwb-chrome) 55%, var(--iwb-canvas-bg) 45%)', '左右停靠栏底色:排进 bg→chrome→home→canvas 灰阶'],
|
||||
['--iwb-dock-head-bg', 'color-mix(in srgb, var(--iwb-panel) 55%, var(--iwb-dock-bg))', '顶栏底色比停靠栏更浅一档'],
|
||||
['--iwb-accent-on-surface', 'color-mix(in srgb, var(--iwb-brand) 45%, var(--iwb-text))', '强调色当文字/图标用:与正文色混,亮色更沉、暗色更亮,两端过 4.5:1'],
|
||||
['--iwb-accent-tint', 'color-mix(in srgb, var(--iwb-brand) 18%, transparent)', '强调色淡底:选中标签/药丸的底(与 --iwb-accent-on-surface 配对使用)'],
|
||||
['--iwb-plugin-bg', 'var(--iwb-bg)', 'v3.25.85 插件主题契约:插件只能用这组别名'],
|
||||
['--iwb-plugin-panel', 'var(--iwb-panel)', null],
|
||||
['--iwb-plugin-layer', 'var(--iwb-layer)', null],
|
||||
|
||||
Reference in new issue
Block a user