Files
hms/apps/miniprogram/src/pages/pkg-health/daily-monitoring/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

289 lines
4.7 KiB
SCSS

@import '../../../styles/variables.scss';
@import '../../../styles/mixins.scss';
.dm-page {
min-height: 100vh;
background: $bg;
padding: 0 0 60px;
}
/* ── hero ── */
.dm-hero {
padding: 48px 32px 36px;
display: flex;
flex-direction: column;
align-items: center;
}
.dm-hero-icon {
@include flex-center;
width: 88px;
height: 88px;
border-radius: $r-lg;
background: $pri-l;
margin-bottom: 20px;
}
.dm-hero-icon-text {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-hero);
font-weight: bold;
color: $pri;
}
.dm-hero-title {
@include section-title;
font-size: var(--tk-font-num-lg);
margin-bottom: 8px;
}
.dm-hero-sub {
font-size: var(--tk-font-h2);
color: var(--tk-text-secondary);
}
/* ── card (standalone, used for date picker) ── */
.dm-card {
background: $card;
border-radius: $r;
box-shadow: $shadow-md;
padding: 28px;
margin: 0 24px 20px;
}
.dm-card-header {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 20px;
}
.dm-card-title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-body-lg);
font-weight: bold;
color: $tx;
}
.dm-card-badge {
@include tag($acc-l, $acc);
font-size: var(--tk-font-body);
margin-left: auto;
}
/* ── date picker ── */
.dm-date-row {
display: flex;
justify-content: space-between;
align-items: center;
background: $bg;
border-radius: $r-sm;
padding: 22px 24px;
}
.dm-date-value {
font-size: var(--tk-font-body-lg);
color: $pri;
@include serif-number;
font-weight: bold;
}
.dm-date-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;
}
/* ── collapsible group ── */
.dm-group {
background: $card;
border-radius: $r;
box-shadow: $shadow-md;
margin: 0 24px 20px;
overflow: hidden;
}
.dm-group-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px 28px;
&:active {
background: $bd-l;
}
}
.dm-group-title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-body-lg);
font-weight: 600;
color: $tx;
}
.dm-group-arrow {
font-size: var(--tk-font-h2);
color: var(--tk-text-secondary);
transition: transform 0.2s ease;
display: inline-block;
}
.dm-group-arrow-open {
transform: rotate(90deg);
}
.dm-group-body {
padding: 0 28px 28px;
}
.dm-group-collapsed .dm-group-body {
display: none;
}
/* ── inner field spacing (within groups) ── */
.dm-inner-field {
margin-bottom: 24px;
&:last-child {
margin-bottom: 0;
}
}
/* ── blood pressure group ── */
.dm-bp-group {
display: flex;
align-items: flex-end;
gap: 12px;
}
.dm-bp-field {
flex: 1;
}
.dm-field-label {
font-size: var(--tk-font-body);
color: $tx2;
display: block;
margin-bottom: 8px;
}
.dm-bp-divider {
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 20px;
gap: 6px;
}
.dm-bp-line {
width: 16px;
height: 1px;
background: $bd;
}
.dm-bp-slash {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-num-lg);
color: var(--tk-text-secondary);
font-weight: 300;
}
.dm-field-unit {
font-size: var(--tk-font-body);
color: var(--tk-text-secondary);
display: block;
margin-top: 10px;
font-style: italic;
}
/* ── single row with unit ── */
.dm-single-row {
display: flex;
align-items: center;
gap: 16px;
}
.dm-input-flex {
flex: 1;
}
.dm-unit-inline {
font-size: var(--tk-font-h1);
color: var(--tk-text-secondary);
white-space: nowrap;
flex-shrink: 0;
}
/* ── input field ── */
.dm-input-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;
}
.dm-input-full {
width: 100%;
}
/* ── abnormal value highlighting ── */
.dm-input-abnormal {
border: 2px solid $wrn;
background: $wrn-l;
}
.dm-field-warning {
font-size: var(--tk-font-body);
color: $wrn;
margin-top: 8px;
display: block;
}
.dm-field-warning-low {
color: #0284C7;
}
/* ── submit ── */
.dm-submit {
background: $pri;
border-radius: $r;
padding: 26px;
text-align: center;
margin: 40px 24px 0;
box-shadow: $shadow-md;
transition: opacity 0.2s;
&:active {
opacity: 0.85;
}
}
.dm-submit-disabled {
opacity: 0.5;
box-shadow: none;
}
.dm-submit-text {
font-size: var(--tk-font-num);
color: white;
font-weight: bold;
letter-spacing: 2px;
}
/* ── reset ── */
.dm-reset {
text-align: center;
padding: 24px;
margin-top: 12px;
}
.dm-reset-text {
font-size: var(--tk-font-h1);
color: var(--tk-text-secondary);
}