Files
hms/apps/miniprogram/src/pages/pkg-health/input/index.scss
iven 890c132890
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
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 变量级联自动生效,消除"打地鼠"问题。
2026-05-09 23:53:07 +08:00

233 lines
4.0 KiB
SCSS

@import '../../../styles/variables.scss';
@import '../../../styles/mixins.scss';
.input-page {
min-height: 100vh;
background: $bg;
padding: 0 0 60px;
}
/* ── hero ── */
.input-hero {
padding: 48px 32px 36px;
display: flex;
flex-direction: column;
align-items: center;
}
.input-hero-icon {
@include flex-center;
width: 88px;
height: 88px;
border-radius: $r-lg;
background: $pri-l;
margin-bottom: 20px;
}
.input-hero-icon-text {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-hero);
font-weight: bold;
color: $pri;
}
.input-hero-title {
@include section-title;
font-size: var(--tk-font-num-lg);
margin-bottom: 8px;
}
.input-hero-sub {
font-size: var(--tk-font-h2);
color: var(--tk-text-secondary);
}
/* ── sync entry ── */
.input-sync-entry {
display: flex;
align-items: center;
justify-content: space-between;
background: $card;
border-radius: $r;
box-shadow: $shadow-sm;
padding: 24px 28px;
margin: 0 24px 20px;
border: 1px dashed $pri;
&:active {
opacity: 0.7;
}
}
.input-sync-entry-text {
font-size: var(--tk-font-body-lg);
font-weight: 600;
color: $pri;
}
.input-sync-entry-hint {
font-size: var(--tk-font-body);
color: var(--tk-text-secondary);
}
/* ── card ── */
.input-card {
background: $card;
border-radius: $r;
box-shadow: $shadow-md;
padding: 28px;
margin: 0 24px 20px;
}
.input-card-header {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 20px;
}
.input-card-indicator {
@include flex-center;
width: 44px;
height: 44px;
border-radius: $r-sm;
background: $acc-l;
}
.input-card-indicator-char {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-h2);
font-weight: bold;
color: $acc;
}
.input-card-label {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-body-lg);
font-weight: bold;
color: $tx;
}
/* ── picker ── */
.input-picker-row {
display: flex;
justify-content: space-between;
align-items: center;
background: $bg;
border-radius: $r-sm;
padding: 22px 24px;
}
.input-picker-value {
font-size: var(--tk-font-body-lg);
color: $tx;
@include serif-number;
}
.input-picker-arrow {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-body);
color: var(--tk-text-secondary);
transform: rotate(180deg);
display: inline-block;
}
/* ── section title ── */
.input-section-title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-body-lg);
font-weight: bold;
color: $tx;
margin-bottom: 16px;
display: block;
}
/* ── blood pressure group ── */
.input-bp-group {
display: flex;
align-items: flex-end;
gap: 12px;
}
.input-bp-field {
flex: 1;
}
.input-field-label {
font-size: var(--tk-font-body);
color: $tx2;
display: block;
margin-bottom: 8px;
}
.input-bp-divider {
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 20px;
gap: 6px;
}
.input-bp-line {
width: 16px;
height: 1px;
background: $bd;
}
.input-bp-slash {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-num-lg);
color: var(--tk-text-secondary);
font-weight: 300;
}
/* ── input field ── */
.input-field-box {
background: $bg;
border-radius: $r-sm;
padding: 20px 24px;
font-size: var(--tk-font-body-lg);
color: $tx;
@include serif-number;
box-sizing: border-box;
}
.input-field-full {
width: 100%;
}
.input-field-unit {
font-size: var(--tk-font-body);
color: var(--tk-text-secondary);
display: block;
margin-top: 10px;
font-style: italic;
}
/* ── submit ── */
.input-submit {
background: $pri;
border-radius: $r;
padding: 26px;
text-align: center;
margin: 48px 24px 0;
box-shadow: $shadow-md;
transition: opacity 0.2s;
&:active {
opacity: 0.85;
}
}
.input-submit-disabled {
opacity: 0.5;
box-shadow: none;
}
.input-submit-text {
font-size: var(--tk-font-num);
color: white;
font-weight: bold;
letter-spacing: 2px;
}