fix(tokens): 标签激活态文字改回主文字色(brand-text 亮色只有 4.42:1)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 47s

brand-text 的语义是「品牌色当文字」(链接/按钮),压在品牌淡底上:
亮色 4.42:1(低于 4.5 门槛),且比未激活标签的 text2(4.46)还弱 ——
选中项反而最不清楚。品牌高亮应由**底色**承担,文字保持最高对比。

改 --iwb-text 后:亮 6.92:1 / 暗 10.27:1。
This commit is contained in:
qiqi committed 2026-11-23 15:06:41 +08:00
1 parent 015e427627
commit 5002fbbefb
3 files changed
+6 -3

No files matched your search

+4 -1
View File
@@ -1166,7 +1166,10 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
* 设置侧栏原先单独写了一份激活态,现在直接继承这一条。 */
.iwb-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: var(--iwb-tab-h); padding: 0 var(--iwb-space-12); border: 0; border-radius: var(--iwb-tab-radius); background: transparent; color: var(--iwb-text2); font-size: var(--iwb-font-sm); cursor: pointer; white-space: nowrap; max-width: 190px; transition: background .15s ease, color .15s ease; }
.iwb-tab:hover { background: var(--iwb-hover); color: var(--iwb-text); }
.iwb-tab-active { background: color-mix(in srgb, var(--iwb-brand) 14%, transparent); color: var(--iwb-brand-text, var(--iwb-brand)); font-weight: 600; }
/* 文字用主文字色而不是 brand-text:brand-text 的语义是「品牌色当文字」(链接/按钮),
* 压在品牌淡底上亮色只有 4.42:1(低于 4.5),且比未激活标签的 text2 还弱 —— 选中项不该最不清楚。
* 品牌高亮体现在**底色**,文字保持最高对比(亮 6.92 / 暗 10.27)。 */
.iwb-tab-active { background: color-mix(in srgb, var(--iwb-brand) 14%, transparent); color: var(--iwb-text); font-weight: 600; }
/* 暗色下品牌 14% 叠在 #121212 上几乎看不出 ⇒ 加深到 22%;文字走 brand-text 保证对比度 */
.theme-dark .iwb-tab-active { background: color-mix(in srgb, var(--iwb-brand) 22%, transparent); }
.iwb-tab:focus-visible { outline: var(--iwb-focus-ring); outline-offset: 1px; }