iter(g182): 暗色阴影与焦点环适配
This commit is contained in:
+2
-2
@@ -2186,8 +2186,8 @@ node packages/tools/cli/bin/ua.js <index|list|info <包名|组件id>|docs|tokens
|
||||
- --ua-duration-slow: 0.25s
|
||||
- --ua-ease: cubic-bezier(0.2, 0.8, 0.2, 1)
|
||||
- --ua-ease-out: cubic-bezier(0.16, 1, 0.3, 1)
|
||||
- --ua-focus-ring: 0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 22%, transparent)
|
||||
- --ua-focus-ring-inset: inset 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 40%, transparent)
|
||||
- --ua-focus-ring: 0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 22%, transparent)(暗色 0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 34%, transparent))
|
||||
- --ua-focus-ring-inset: inset 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 40%, transparent)(暗色 inset 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 52%, transparent))
|
||||
- --ua-control-h-sm: 28px
|
||||
- --ua-control-h-md: 34px
|
||||
- --ua-control-h-lg: 40px
|
||||
|
||||
@@ -100,4 +100,6 @@
|
||||
--ua-shadow-4: 0 18px 44px rgba(0, 0, 0, 0.5); /* 暗色 4 档:模态 / 抽屉 / 通知 */
|
||||
--ua-shadow-accent: 0 3px 10px color-mix(in srgb, var(--ua-color-accent) 30%, transparent); /* 暗色主题色投影:透明度略升补可见性 */
|
||||
--ua-shadow-accent-strong: 0 8px 20px color-mix(in srgb, var(--ua-color-accent) 40%, transparent); /* 暗色主题色强投影 */
|
||||
--ua-focus-ring: 0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 34%, transparent); /* 暗色焦点环:透明度略升补对比 */
|
||||
--ua-focus-ring-inset: inset 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 52%, transparent); /* 暗色内嵌焦点环 */
|
||||
}
|
||||
|
||||
@@ -113,8 +113,14 @@
|
||||
"easeOut": "cubic-bezier(0.16, 1, 0.3, 1)"
|
||||
},
|
||||
"focus": {
|
||||
"ring": "0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 22%, transparent)",
|
||||
"ringInset": "inset 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 40%, transparent)"
|
||||
"ring": {
|
||||
"light": "0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 22%, transparent)",
|
||||
"dark": "0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 34%, transparent)"
|
||||
},
|
||||
"ringInset": {
|
||||
"light": "inset 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 40%, transparent)",
|
||||
"dark": "inset 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 52%, transparent)"
|
||||
}
|
||||
},
|
||||
"control": {
|
||||
"height": {
|
||||
|
||||
@@ -1015,6 +1015,10 @@ function checkDarkTokens(issues) {
|
||||
if (!n.startsWith('--ua-color-')) continue; // 卫语句:只有颜色需要暗色重定值,间距/字号/圆角通用
|
||||
if (!darkSet.has(n)) issues.push(`tokens: 颜色令牌 ${n} 缺 [data-theme='dark'] 覆盖(暗色下会沿用亮色值)`);
|
||||
}
|
||||
for (const n of rootNames) {
|
||||
if (!/^--ua-(shadow|focus)/.test(n)) continue; // 卫语句:阴影与焦点环在暗底上必须重定值(黑投影要加黑、色环要补对比)
|
||||
if (!darkSet.has(n)) issues.push(`tokens: 令牌 ${n} 缺 [data-theme='dark'] 覆盖(暗底上沿用亮色值会丢层级/焦点对比)`);
|
||||
}
|
||||
for (const n of darkNames) if (!rootSet.has(n)) issues.push(`tokens: 暗色块里的 ${n} 未在 :root 定义(改名后忘了同步)`);
|
||||
}
|
||||
/*** llms-full.txt 同步校验:内联重渲染 Agent 文档(时间戳归一化)与落盘产物比对,防 manifest 改后忘跑 docs ***/
|
||||
|
||||
Reference in New Issue
Block a user