Css 修改mixin中的引导变量
使用Bootstrap 4,我尝试在mixin中更改Css 修改mixin中的引导变量,css,sass,bootstrap-4,scss-mixins,Css,Sass,Bootstrap 4,Scss Mixins,使用Bootstrap 4,我尝试在mixin中更改brand primary的值: // variables $theme-colors: ( "main": #9fa28b, "another-section": #ec008c, "yet-another-section": #00b0d8 ); // main scss @mixin theme($color){ $theme-colors: ( "brand-primary": $color
brand primary
的值:
// variables
$theme-colors: (
"main": #9fa28b,
"another-section": #ec008c,
"yet-another-section": #00b0d8
);
// main scss
@mixin theme($color){
$theme-colors: (
"brand-primary": $color
);
}
body {
@include theme(theme-color($key: "main"));
&.another-section {
@include theme(theme-color($key: "another-section"));
}
&.yet-another-section {
@include theme(theme-color($key: "yet-another-section"));
}
}
它编译时没有错误,但是编译后的css中没有类另一节
或另一节
有没有办法在mixin(或任何变量)中覆盖
品牌主色
。您所要做的就是覆盖原色检查此链接在此处查看:
使用map.get($theme colors,“warning”);相反 您正在尝试修改哪个版本的引导?引导程序4中没有
品牌主
变量?它只是初级的?