加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

sass – 如何创建_custom.scss以覆盖Bootstrap 4 alpha 6中的变

发布时间:2020-12-17 20:42:27 所属栏目:安全 来源:网络整理
导读:我正在尝试自定义Bootstrap 4 alpha 6主题.我想将_variable.scss文件中的设置复制到_custom.scss以覆盖.但我没有在源代码中找到_custom.scss文件.如何在项目中添加此_custom.scss文件? 解决方法 我注意到你的问题 here,here和 here: ? Consider implementi
我正在尝试自定义Bootstrap 4 alpha 6主题.我想将_variable.scss文件中的设置复制到_custom.scss以覆盖.但我没有在源代码中找到_custom.scss文件.如何在项目中添加此_custom.scss文件?

解决方法

我注意到你的问题 here,here和 here:

? 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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读