Files
wx_pbzc/app.wxss
T
lc 89d93c8155 refactor(ui): 12-point UI polish and bugfixes
Bug fixes:
- #1 Remove duplicate month label from calendar-heatmap (shown twice in records)
- #2 Extract shared .modal-overlay to app.wxss (was duplicated in index/records)

UX improvements:
- #3 Add long-press hint to history list in records page
- #4 Add drag handle + catchtouchmove to picker modal
- #5 Extend timer auto-navigate-back from 1.5s to 3s
- #6 Add clear data option in settings with confirmation dialog

Visual/code polish:
- #7 Remove 4 unused @keyframes (shimmer, spin) and 5 unused .icon classes
- #8 Tab bar inactive colors: hardcoded #888/#666 -> var(--text-secondary)
- #10 Split progress-ring observer to avoid redundant setData on size/color changes
- #12 Remove meaningless Math.min(planDay, 99) cap
2026-06-04 16:34:22 +08:00

155 lines
3.1 KiB
Plaintext

page {
--primary: #FF6B35;
--primary-light: #FF8C5A;
--primary-bg: #FFF3ED;
--primary-rgb: 255,107,53;
--text: #333333;
--text-secondary: #999999;
--bg: #F5F5F5;
--card-bg: #FFFFFF;
--success: #4CAF50;
--border: #EEEEEE;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
font-size: 28rpx;
color: var(--text);
background-color: var(--bg);
}
.container {
padding: 24rpx;
padding-bottom: calc(134rpx + env(safe-area-inset-bottom));
min-height: 100vh;
box-sizing: border-box;
}
.card {
background: var(--card-bg);
border-radius: 24rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
animation: cardIn 0.45s ease both;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.25s; }
.card:nth-child(4) { animation-delay: 0.35s; }
@keyframes cardIn {
from {
opacity: 0;
transform: translateY(40rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.btn-primary {
background: linear-gradient(135deg, var(--primary), var(--primary-light));
color: #fff;
border: none;
border-radius: 48rpx;
font-size: 34rpx;
font-weight: 600;
padding: 24rpx 0;
text-align: center;
transition: transform 0.15s ease, box-shadow 0.15s ease;
box-shadow: 0 8rpx 24rpx rgba(var(--primary-rgb), 0.3);
}
.btn-primary:active {
transform: scale(0.96);
box-shadow: 0 4rpx 12rpx rgba(var(--primary-rgb), 0.2);
}
/* ---- pulse ring (used on timer page) ---- */
@keyframes breathePulse {
0%, 100% {
transform: scale(0.92);
opacity: 0.6;
}
50% {
transform: scale(1.08);
opacity: 0.15;
}
}
@keyframes breathePulseFast {
0%, 100% {
transform: scale(0.94);
opacity: 0.7;
}
50% {
transform: scale(1.06);
opacity: 0.2;
}
}
/* ---- float ---- */
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-12rpx); }
}
/* ---- pop / bounce ---- */
@keyframes popIn {
0% { transform: scale(0); opacity: 0; }
60% { transform: scale(1.15); }
100% { transform: scale(1); opacity: 1; }
}
@keyframes bounceSoft {
0%, 100% { transform: translateY(0); }
30% { transform: translateY(-16rpx); }
50% { transform: translateY(0); }
70% { transform: translateY(-6rpx); }
}
.section-title {
font-size: 32rpx;
font-weight: 600;
color: var(--text);
margin-bottom: 20rpx;
}
/* ---- shared modal overlay ---- */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.45);
z-index: 1000;
}
.modal-overlay-bottom {
display: flex;
align-items: flex-end;
justify-content: center;
}
.modal-overlay-center {
display: flex;
align-items: center;
justify-content: center;
}
/* ---- shared danger button ---- */
.btn-danger {
background: #fff;
color: #E53935;
border: 2rpx solid rgba(229, 57, 53, 0.3);
border-radius: 48rpx;
font-size: 28rpx;
padding: 20rpx 0;
text-align: center;
}
.btn-danger::after { border: none; }