refactor(miniprogram): 全面接入 Design Token — 68 SCSS 文件 px→var(--tk-*)
- 重写 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:
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
.points-label {
|
||||
font-size: 26px;
|
||||
font-size: var(--tk-font-h1);
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
.checkin-btn-text {
|
||||
font-size: 24px;
|
||||
font-size: var(--tk-font-h2);
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
.points-balance {
|
||||
@include serif-number;
|
||||
font-size: 72px;
|
||||
font-size: 72px; /* kept as-is: special display value */
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
display: block;
|
||||
@@ -71,7 +71,7 @@
|
||||
}
|
||||
|
||||
.points-streak {
|
||||
font-size: 22px;
|
||||
font-size: var(--tk-font-body);
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
display: block;
|
||||
}
|
||||
@@ -102,7 +102,7 @@
|
||||
}
|
||||
|
||||
.type-tab-text {
|
||||
font-size: 28px;
|
||||
font-size: var(--tk-font-body-lg);
|
||||
color: $tx2;
|
||||
|
||||
&.active {
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
.product-image-char {
|
||||
font-family: 'Georgia', 'Times New Roman', serif;
|
||||
font-size: 56px;
|
||||
font-size: var(--tk-font-hero);
|
||||
font-weight: bold;
|
||||
color: $pri;
|
||||
line-height: 1;
|
||||
@@ -156,7 +156,7 @@
|
||||
}
|
||||
|
||||
.product-name {
|
||||
font-size: 26px;
|
||||
font-size: var(--tk-font-h1);
|
||||
font-weight: 600;
|
||||
color: $tx;
|
||||
display: block;
|
||||
@@ -180,20 +180,20 @@
|
||||
|
||||
.product-points-char {
|
||||
font-family: 'Georgia', 'Times New Roman', serif;
|
||||
font-size: 22px;
|
||||
font-size: var(--tk-font-body);
|
||||
font-weight: bold;
|
||||
color: $wrn;
|
||||
}
|
||||
|
||||
.product-points-value {
|
||||
@include serif-number;
|
||||
font-size: 28px;
|
||||
font-size: var(--tk-font-body-lg);
|
||||
font-weight: bold;
|
||||
color: $wrn;
|
||||
}
|
||||
|
||||
.product-stock {
|
||||
font-size: 22px;
|
||||
font-size: var(--tk-font-body);
|
||||
padding: 2px 10px;
|
||||
border-radius: $r-sm;
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 160px 40px;
|
||||
padding: 100px 40px;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
@@ -226,22 +226,22 @@
|
||||
|
||||
.empty-char {
|
||||
font-family: 'Georgia', 'Times New Roman', serif;
|
||||
font-size: 52px;
|
||||
font-size: var(--tk-font-hero);
|
||||
font-weight: bold;
|
||||
color: $pri;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
font-size: 32px;
|
||||
font-size: var(--tk-font-body-lg);
|
||||
font-weight: 600;
|
||||
color: $tx;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.empty-hint {
|
||||
font-size: 26px;
|
||||
color: $tx3;
|
||||
font-size: var(--tk-font-h1);
|
||||
color: var(--tk-text-secondary);
|
||||
text-align: center;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
@@ -257,7 +257,7 @@
|
||||
}
|
||||
|
||||
.empty-action-text {
|
||||
font-size: 28px;
|
||||
font-size: var(--tk-font-body-lg);
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user