iter(g245): 补高对比偏好令牌,对比度门禁扩到四套主题

This commit is contained in:
HIsheR
2026-10-26 21:58:58 +08:00
parent 26c9867576
commit 6e52cc6206
9 changed files with 46 additions and 16 deletions
+18
View File
@@ -189,3 +189,21 @@
--ua-focus-outline-inset: 1.5px solid var(--ua-color-accent-soft); /* 暗色内嵌焦点描边:accent-soft 随底色重混 */
--ua-focus-outline-soft: 2px solid color-mix(in srgb, var(--ua-color-accent) var(--ua-alpha-mid), transparent); /* 暗色柔和外描边:浓度档与亮色一致 */
}
/* ---- 高对比偏好:系统设置「提高对比度」时加深边界与弱文字 ----
为什么放文件末尾:媒体查询里的同选择器规则要靠后置胜出,写在暗色块之前会被顶掉。
只重设已有变量、不新增名字:verify 的颜色令牌 ↔ tokens.json 双向核对保持一一对应。 */
@media (prefers-contrast: more) {
:root {
--ua-color-border: rgba(0, 0, 0, 0.45); /* 边界加深:控件轮廓在强光 / 低视力下仍可辨(边框细分线随之加深,它是 border 的混色派生) */
--ua-color-text-muted: #4b5158; /* 辅助文字升级为次级文字色,说明文字不再是浅灰 */
--ua-color-text-faint: #6b7280; /* 三级文字升到原辅助档:禁用态也要读得清 */
--ua-color-scrollbar: rgba(0, 0, 0, 0.45); /* 滚动条拇指加深,可拖拽区域更明确 */
}
[data-theme='dark'] {
--ua-color-border: rgba(255, 255, 255, 0.45); /* 暗色同样加深:白边提亮而不是加深黑 */
--ua-color-text-muted: #b4bac2;
--ua-color-text-faint: #888780;
--ua-color-scrollbar: rgba(255, 255, 255, 0.5);
}
}