style: 将项目内硬编码色彩替换为CSS变量,兼容多平台

本次提交将项目内47处硬编码色彩值替换为CSS自定义属性,同时添加了兜底纯色样式以兼容旧版小程序 runtime。覆盖了微信小程序、鸿蒙元服务和H5三端,所有渐变、纯色、边框色都增加了主题化支持,并新增了多平台主题兼容测试文档。
This commit is contained in:
2026-06-11 15:32:00 +08:00
parent 555443dc44
commit 08caa49b43
18 changed files with 405 additions and 57 deletions

View File

@@ -351,7 +351,9 @@
line-height: 62px;
border-radius: 34px !important;
border-radius: 128px;
background: #ff3c29;
// P0: 提现按钮默认底色 → var(--fenxiao-withdraw-start)
// 兼容: 微信小程序 / 鸿蒙元服务 — background 接受 var() 无问题
background: var(--fenxiao-withdraw-start, #ff3c29);
color: #fff;
font-size: 32px;
font-weight: 400;
@@ -359,8 +361,11 @@
border: 0;
}
.renren-btn.do {
background: -webkit-linear-gradient(317.43deg, #ff3c29, #ff6f29 94.38%);
background: linear-gradient(132.57deg, #ff3c29, #ff6f29 94.38%);
// P0: 分销提现按钮渐变 → var(--fenxiao-withdraw-start/end)
// 兼容: 微信小程序 / 鸿蒙元服务 — -webkit-linear-gradient 嵌套 var() 现代 runtime 支持
background: #ff3c29; // 兜底
background: -webkit-linear-gradient(317.43deg, var(--fenxiao-withdraw-start, #ff3c29), var(--fenxiao-withdraw-end, #ff6f29) 94.38%);
background: linear-gradient(132.57deg, var(--fenxiao-withdraw-start, #ff3c29), var(--fenxiao-withdraw-end, #ff6f29) 94.38%);
font-size: 28rpx;
font-weight: 500;
}