refactor(miniprogram): 全面接入 Design Token — 68 SCSS 文件 px→var(--tk-*)
Some checks failed
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled

- 重写 tokens.scss:校准 10 级字号 + 4 结构 token 匹配实际设计值
- 更新 mixins.scss:4 个 mixin 引用 token 替代硬编码
- 68 SCSS 文件全面迁移:font-size px → var(--tk-font-*),辅助文字色 → var(--tk-text-secondary)
- 清理 12 个页面的本地 mixin 重复定义
- elder-mode.scss 从 530 行缩减至 ~120 行:删除所有字号/颜色覆写,仅保留结构布局
- Token 覆盖率:634 引用 / 仅 3 个特殊硬编码值(72px/80px/21px)

关怀模式通过 CSS 变量级联自动生效,消除"打地鼠"问题。
This commit is contained in:
iven
2026-05-09 23:53:07 +08:00
parent 257ca94a25
commit 890c132890
74 changed files with 1127 additions and 1688 deletions

View File

@@ -13,7 +13,7 @@
}
.article-title {
font-size: 38px;
font-size: var(--tk-font-hero);
font-weight: bold;
color: $tx;
display: block;
@@ -29,7 +29,7 @@
}
.article-category {
font-size: 22px;
font-size: var(--tk-font-body);
color: $pri;
background: $pri-l;
padding: 4px 12px;
@@ -37,13 +37,13 @@
}
.article-author {
font-size: 24px;
font-size: var(--tk-font-h2);
color: $tx2;
}
.article-date {
font-size: 24px;
color: $tx3;
font-size: var(--tk-font-h2);
color: var(--tk-text-secondary);
}
.article-summary {
@@ -53,7 +53,7 @@
}
.summary-text {
font-size: 26px;
font-size: var(--tk-font-h1);
color: $tx2;
line-height: 1.6;
}
@@ -70,7 +70,7 @@
}
p {
font-size: 28px;
font-size: var(--tk-font-body-lg);
color: $tx;
line-height: 1.8;
margin-bottom: 16px;
@@ -93,6 +93,6 @@
.loading-text,
.empty-text {
font-size: 28px;
color: $tx3;
font-size: var(--tk-font-body-lg);
color: var(--tk-text-secondary);
}

View File

@@ -16,7 +16,7 @@
display: inline-block;
padding: 12px 28px;
margin-right: 12px;
font-size: 26px;
font-size: var(--tk-font-h1);
color: $tx2;
background: $card;
border-radius: 32px;
@@ -52,7 +52,7 @@
}
.article-card-title {
font-size: 30px;
font-size: var(--tk-font-num);
font-weight: bold;
color: $tx;
line-height: 1.4;
@@ -66,7 +66,7 @@
}
.article-card-summary {
font-size: 26px;
font-size: var(--tk-font-h1);
color: $tx2;
line-height: 1.4;
display: block;
@@ -83,7 +83,7 @@
}
.article-card-tag {
font-size: 22px;
font-size: var(--tk-font-body);
color: $pri;
background: $pri-l;
padding: 2px 12px;
@@ -91,7 +91,7 @@
}
.article-card-date {
font-size: 22px;
font-size: var(--tk-font-body);
color: $tx3;
}
@@ -116,8 +116,8 @@
}
.empty-text {
font-size: 28px;
color: $tx3;
font-size: var(--tk-font-body-lg);
color: var(--tk-text-secondary);
}
.loading-hint {
@@ -126,6 +126,6 @@
}
.loading-text {
font-size: 24px;
color: $tx3;
font-size: var(--tk-font-h2);
color: var(--tk-text-secondary);
}