[内容]
在官方的uni.scss中条件编译无效
重现步骤
[步骤]在部分想要条件编译的css变量上使用条件编译包裹
[结果]
条件编译无效,排在后面的css变量会覆盖排在前面的css变量;
无论条件编译怎么写,总是会以排在后面的css变量为主
[期望]
/ 首页,导航栏样式 /
//$color-nav-bar-color : #ffffff;
$color-nav-bar-background : #E0B2AD;
$color-nav-bar-font-size : 16px;
$color-nav-btn-border-color: rgba(255, 255, 255, 0.25);
//$color-nav-btn-background:rgba(0,0,0,0.15);
//$color-nav-title-color: #333333;
/ 首页,搜索框样式 /
//$color-search-background: #ffffff;
//$color-search-box-background: rgba(0,0,0,0.15);
$color-search-box-color: #333333;
$color-search-right-left: #ffffff;
/ 首页,导航栏样式 /
$color-tab-background:white;
$color-tab-item-select:#E61D4C;
/ #ifndef MP-WEIXIN /
$color-nav-bar-color: #333333;
$color-nav-btn-background: rgba(255,255,255,0.5);
$color-nav-title-color: #ffffff;
$color-search-background: #333333;
$color-search-box-background: rgba(255,255,255,0.5);
/ #endif /
/ #ifdef MP-WEIXIN /
$color-nav-bar-color: #ffffff;
$color-nav-btn-background: rgba(0,0,0,0.15);
$color-nav-title-color: #333333;
$color-search-background: #ffffff;
$color-search-box-background: rgba(0,0,0,0.15);
/ #endif /
陈小跑
官方文档说支持,实际scss编译ok,但加上条件编译后无效,没什么卵用
2020-07-28 17:51