Files
hms/apps/miniprogram/src/pages/login/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

154 lines
2.5 KiB
SCSS

@import '../../styles/variables.scss';
@import '../../styles/mixins.scss';
.login-scroll {
height: 100vh;
}
.login-page {
min-height: 100vh;
background: $bg;
display: flex;
flex-direction: column;
align-items: center;
padding: 100px 40px 60px;
}
/* ─── 品牌区 ─── */
.login-brand {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 48px;
}
.login-logo {
width: 96px;
height: 96px;
border-radius: $r-lg;
background: $pri;
@include flex-center;
margin-bottom: 24px;
box-shadow: 0 8px 24px rgba($pri, 0.3);
}
.login-logo-mark {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-hero);
color: #fff;
font-weight: bold;
line-height: 1;
}
.login-title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-num);
color: $tx;
font-weight: bold;
margin-bottom: 8px;
}
.login-subtitle {
font-size: var(--tk-font-body-sm);
color: $tx2;
letter-spacing: 0.05em;
}
/* ─── 装饰线 ─── */
.login-divider {
width: 48px;
margin-bottom: 40px;
}
.login-divider-line {
height: 3px;
background: $pri;
border-radius: 2px;
opacity: 0.4;
}
/* ─── 登录按钮 ─── */
.login-body {
width: 100%;
}
.login-btn {
width: 100%;
height: $btn-primary-h;
background: $pri;
color: #fff;
font-size: var(--tk-font-body-lg);
font-weight: 600;
border-radius: $r;
border: none;
@include flex-center;
letter-spacing: 0.04em;
box-shadow: 0 4px 16px rgba($pri, 0.25);
padding: 0;
line-height: 1;
&::after {
border: none;
}
&:active {
opacity: 0.85;
}
}
/* ─── 协议 ─── */
.agreement-row {
display: flex;
align-items: flex-start;
margin-top: 28px;
gap: 10px;
width: 100%;
}
.agreement-check {
width: 28px;
height: 28px;
border: 2px solid $bd;
border-radius: $r-sm;
@include flex-center;
flex-shrink: 0;
margin-top: 2px;
transition: all 0.2s;
&.checked {
background: $pri;
border-color: $pri;
}
}
.agreement-check-mark {
font-size: var(--tk-font-body-sm);
color: #fff;
font-weight: bold;
line-height: 1;
}
.agreement-text {
font-size: var(--tk-font-cap);
color: $tx2;
line-height: 1.7;
}
.agreement-link {
color: $pri;
font-weight: 500;
}
/* ─── 暂不登录 ─── */
.skip-row {
width: 100%;
text-align: center;
margin-top: 24px;
}
.skip-btn {
font-size: var(--tk-font-body-sm);
color: var(--tk-text-secondary);
padding: 8px 16px;
}