fix: 深色模式下高亮/占位元素正确适配
修改: - theme.js: 新增 --bg-soft 变量(浅色 #F0F0F0, 深色 #2C2C2E) - settings.wxss: .theme-item.active / .plan-item.active 改用 rgba(var(--primary-rgb), 0.12) 替代 var(--primary-bg) - leaderboard.wxss: - .period-tabs 背景用 var(--card-bg) 替代 #FFFFFF - .rank-num / .rank-avatar 用 var(--bg-soft) 替代硬编码灰 - .rank-item.is-me / .my-bar 用 rgba() 替代 var(--primary-bg) 根因: --primary-bg 是品牌色极浅版,深色模式下仍是浅色, 不适合做高亮底色。rgba() 在两种模式下都自适应。
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
.theme-item:last-child { border-bottom: none; }
|
||||
|
||||
.theme-item.active {
|
||||
background: var(--primary-bg);
|
||||
background: rgba(var(--primary-rgb), 0.12);
|
||||
margin: 0 -32rpx;
|
||||
padding-left: 32rpx;
|
||||
padding-right: 32rpx;
|
||||
@@ -78,7 +78,7 @@
|
||||
.plan-item:last-child { border-bottom: none; }
|
||||
|
||||
.plan-item.active {
|
||||
background: var(--primary-bg);
|
||||
background: rgba(var(--primary-rgb), 0.12);
|
||||
margin: 0 -32rpx;
|
||||
padding-left: 32rpx;
|
||||
padding-right: 32rpx;
|
||||
|
||||
Reference in New Issue
Block a user