Files
danyang-match/miniapp/pages/notifications/notifications.wxss
T
WorkBuddy 269adf1fed 小程序端:设计系统收敛与排版层级修复
问题:88 个 wxss 里散落大量硬编码颜色/字号/字重,无法统一调整;
部分正文对比度不达 WCAG AA(4.5:1);组件触摸目标偏小。

改动:
- 硬编码颜色收敛到语义 token(颜色统一走 design token,不再散落字面值)
- 修正全站字号阶梯:正文 ≥12px、角标 ≥11px;字重只用 400/500/600/700
- 组件触摸目标提升到 ≥44px,并补交互反馈
- 首页补氛围层次、强化排版层级

验证(本轮实测):
- UI 契约门禁 18/18 PASS(含 wxml 结构、wxss 组件选择器、token 显式值断言)
- 声明级体检 88/88 通过(全部 wxss 声明合法)

交付物:artifacts/miniapp-design-v2-preview.html
2026-09-23 01:06:46 +08:00

128 lines
2.4 KiB
Plaintext

.page {
min-height:100vh;
background:var(--color-primary-lighter);
}
.header {
display:flex;
align-items:center;
justify-content:space-between;
padding:32rpx;
background:var(--color-bg-card);
border-bottom:1rpx solid var(--color-divider);
}
.title {
font-size:36rpx;
font-weight:bold;
color:var(--color-text-strong);
}
.unread-badge {
font-size:24rpx;
color:var(--color-primary-strong);
padding:8rpx 16rpx;
background:var(--color-primary-light);
border-radius:20rpx;
}
.unread-badge.empty {
color:var(--color-text-tertiary);
background:var(--color-bg-subtle);
}
.list {
height:calc(100vh - 120rpx);
}
.notif-item {
display:flex;
align-items:flex-start;
padding:28rpx 32rpx;
background:var(--color-bg-card);
border-bottom:1rpx solid var(--color-divider);
gap:16rpx;
}
.notif-item.unread {
background:var(--color-primary-lighter);
}
.notif-dot {
width:12rpx;
height:12rpx;
border-radius:50%;
background:var(--color-primary);
flex-shrink:0;
margin-top:12rpx;
}
.notif-content {
flex:1;
min-width:0;
}
.notif-header {
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:8rpx;
}
.notif-title {
font-size:28rpx;
font-weight:bold;
color:var(--color-text-strong);
}
.notif-time {
font-size:24rpx;
color:var(--color-text-tertiary);
}
.notif-body {
font-size:24rpx;
color:var(--color-text-secondary);
line-height:1.6;
margin-bottom:12rpx;
}
.notif-type-tag {
display:inline-block;
font-size:24rpx;
padding:4rpx 12rpx;
border-radius:12rpx;
background:var(--color-bg-subtle);
color:var(--color-text-tertiary);
}
.notif-type-tag.match { background:var(--color-success-light); color:var(--color-success-strong); }
.notif-type-tag.review { background:var(--color-info-light); color:var(--color-info-strong); }
.notif-type-tag.activity { background:var(--color-warning-light); color:var(--color-warning-strong); }
.notif-type-tag.risk { background:var(--color-primary-light); color:var(--color-danger-strong); }
.notif-type-tag.account { background:var(--color-accent-purple-light); color:var(--color-accent-purple-strong); }
.empty {
text-align:center;
padding:120rpx 40rpx;
}
.empty-img {
width:160rpx;
height:160rpx;
margin-bottom:24rpx;
opacity:0.5;
}
.empty-text {
display:block;
font-size:28rpx;
color:var(--color-text-tertiary);
}
.loading {
text-align:center;
padding:40rpx;
color:var(--color-text-tertiary);
}