我正在尝试自定义Bootstrap 4 alpha 6主题.我想将_variable.scss文件中的设置复制到_custom.scss以覆盖.但我没有在源代码中找到_custom.scss文件.如何在项目中添加此_custom.scss文件? 我注意到你的问
☐ Consider implementing a
_custom.scss
for easier, built-in variable overrides?
因此,因为你的Bootstrap 4没有附带_custom.scss文件,所以你只需要重新创建bootstrap / scss / _custom.scss.
然后编辑bootstrap / scss / bootstrap.scss到它应该是什么:
// Core variables and mixins @import "variables"; @import "mixins"; @import "custom";
然后按照Customising variables
Bootstrap 4 [supposedly] ships with a
_custom.scss
file for easy overriding of default variables in/scss/_variables.scss
. Copy and paste relevant lines from there into the_custom.scss
file, modify the values, and recompile your Sass to change our default values. Be sure to remove the!default
flag from override values.