fix(tokens): 端口描边改由文字色派生(深色下与填充同色,边缘糊)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 37s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 37s
换完 --iwb-field 底色后放大 8 倍发现:深色下端口是一团糊的圆点,不是清晰的旋钮。 原因不是颜色不够亮,是描边用的 --iwb-border2 在深色下是 #4d4d4d,与填充 #494949 同色 —— 1.5px 描边等于不存在,12px 的小圆点只能靠 12 级填充差自我定义。 改为 color-mix(text 55%, transparent):亮 #828282 / 暗 #9e9e9e, 对填充各 4.6:1 / 3.4:1(非文字元素红线 3:1),两个主题同一档锐度。 node-scope-test 补一条断言:端口描边必须由 --iwb-text 派生,不许退回 --iwb-border2。 这条守的是「边缘锐度」而不是「颜色对不对」—— 后者截图能看出来,前者只有放大才看得见。
This commit is contained in:
1 parent
513c300e43
commit
f4a5709e8b
7 files changed
+14
-1
No files matched your search
@@ -44,6 +44,12 @@ assert.deepStrictEqual(
|
||||
const port = blocks.find((b) => b.sel === '.iwb-port')
|
||||
assert.ok(port, '找不到 .iwb-port 规则')
|
||||
assert.ok(port.body.includes('background: var(--iwb-field)'), '.iwb-port 底色必须是 --iwb-field')
|
||||
// 描边必须由文字色派生:深色下 --iwb-border2 是 #4d4d4d,与填充 --iwb-field(#494949) 同色,
|
||||
// 描边等于没有,12px 的小圆点会糊成一团。这条断言守的是「边缘锐度」而不只是「颜色对」。
|
||||
assert.ok(
|
||||
/border:\s*1\.5px solid color-mix\(in srgb, var\(--iwb-text\)/.test(port.body),
|
||||
'.iwb-port 描边必须由 --iwb-text 派生(--iwb-border2 在深色下与填充同色,端口边缘会糊)'
|
||||
)
|
||||
for (const sel of ['.iwb-node:hover .iwb-port', '.iwb-port:hover', '.iwb-node-selected .iwb-port:not(.iwb-port-linked)']) {
|
||||
const b = blocks.find((x) => x.sel === sel)
|
||||
assert.ok(b, '找不到规则:' + sel)
|
||||
|
||||
Reference in new issue
Block a user