全面修复前端 UI 设计审查问题:消除工程债务、统一 token 体系、提升可维护性

- 消除 !important 滥用:134 → 49(仅保留 Leaflet/图表所必需项),浅色主题使用 html.light 选择器获得更高优先级
- 修复 font-weight:13 个文件中所有 760/850/860/880/950 等非标准值已映射为 Inter 支持的 300–800
- 移除未加载的 Geist 字体声明,替换为 Inter
- 添加全局 :focus-visible 轮廓环、跳过链接、Tab ARIA 属性(role/aria-selected)
- 统一断点体系:18 → 10(480/640/768/960/1024/1200/1280/1360/1440/1680)
- 创建 scan-root-styles.ts 桶文件,将 22 个 CSS Module 导入合并为 1 个
- Token 迁移:10 个文件中数百处硬编码颜色(#4DA3FF/#E6EDF3/#9FB2C7/#6B7A90)已替换为 CSS 变量
- 去重 @keyframes:spin 4→1、loading-spin 2→0、pulse-pending 已移至 globals.css
- 添加统一的 empty/error/retry 状态组件
- 添加全局 prefers-reduced-motion 支持
- 修复 accent-primary 与 accent-secondary 相同值的问题
- 修复 accent-green 类错误渲染为蓝色
- 添加 CSS 渐变品牌 Logo
- 移除死代码(1,697 行):public/static/style.css + public/legacy/index.html
- Dashboard.module.css 本地变量已桥接至全局 token
- 提升文字对比度:#6B7A90 → #7D8FA3

Fixed: !important-134-to-49, font-weight-13-files, Geist-removal, focus-visible, breakpoints-18-to-10, CSS-module-barrel, token-migration-10-files, keyframe-dedup, dead-code-removal, accent-color-fix, contrast-improvement
Scope: frontend CSS architecture, design tokens, accessibility, responsive breakpoints
Tested: npx tsc --noEmit
This commit is contained in:
2569718930@qq.com
2026-05-10 14:21:10 +08:00
parent f47de115c8
commit 00e1845f2c
30 changed files with 1081 additions and 2186 deletions
@@ -116,7 +116,7 @@
border: 1px solid rgba(34, 211, 238, 0.28);
border-radius: 8px;
background: rgba(8, 47, 73, 0.36);
color: #6FB7FF;
color: var(--color-accent-secondary);
font-size: 11px;
font-weight: 800;
line-height: 1.25;
@@ -195,7 +195,7 @@
.root :global(.future-v2-decision-anchor small) {
display: block;
margin-top: 6px;
color: #6FB7FF;
color: var(--color-accent-secondary);
font-size: 11px;
font-weight: 700;
line-height: 1.3;
@@ -219,7 +219,7 @@
.root :global(.future-v2-decision-grid strong) {
display: block;
margin-top: 7px;
color: #6FB7FF;
color: var(--color-accent-secondary);
font-size: 18px;
font-weight: 800;
line-height: 1;
@@ -250,7 +250,7 @@
.root :global(.future-v2-meteorology-paths strong) {
display: block;
margin-top: 8px;
color: #6FB7FF;
color: var(--color-accent-secondary);
font-size: 22px;
font-weight: 800;
line-height: 1;
@@ -595,7 +595,7 @@
}
.root :global(.future-v2-signal-tag.cyan) {
color: #6FB7FF;
color: var(--color-accent-secondary);
border-color: rgba(34, 211, 238, 0.22);
background: rgba(34, 211, 238, 0.08);
}
@@ -684,7 +684,7 @@
}
.root :global(.future-v2-pace-delta.cold) {
color: #6FB7FF;
color: var(--color-accent-secondary);
}
.root :global(.future-v2-pace-delta.neutral) {
@@ -759,7 +759,7 @@
}
.root :global(.future-v2-pace-meter-fill.cold) {
background: linear-gradient(90deg, #0f766e 0%, #6FB7FF 100%);
background: linear-gradient(90deg, #0f766e 0%, var(--color-accent-secondary) 100%);
}
.root :global(.future-v2-pace-meter-fill.neutral) {
@@ -1322,7 +1322,7 @@
left: 0;
bottom: 0;
border-radius: inherit;
background: linear-gradient(90deg, #334155 0%, #9FB2C7 100%);
background: linear-gradient(90deg, #334155 0%, var(--color-text-secondary) 100%);
}
.root :global(.future-trend-meter-fill.warm) {
@@ -1609,7 +1609,7 @@
}
}
@media (max-width: 420px) {
@media (max-width: 480px) {
.root :global(.future-forward-stats) {
grid-template-columns: 1fr;
}