引导程序自定义SASS变量覆盖无效 [英] Bootstrap Customization SASS Variables Override Not Working

查看:94
本文介绍了引导程序自定义SASS变量覆盖无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如此处所述尝试自定义Bootstrap: https://getbootstrap.com/docs/4.0/getting-started/options/

Trying to customize Bootstrap as documented here: https://getbootstrap.com/docs/4.0/getting-started/options/

这是我的main.scss文件:

@charset 'utf-8';

@import 'variables';
@import url('https://fonts.googleapis.com/css?family=Montserrat:500,700');
@import url('https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css');
@import 'layouts';

在变量文件中,我有:

$font-family-base: 'Montserrat', sans-serif;
$body-color: red;

但是,Bootstrap会忽略这些变量.我在做什么错了?

However, these variables are ignored by Bootstrap. What am I doing wrong?

推荐答案

但是您正在导入css文件.

But you are importing the css file.

只需下载sass源,将其导入,然后您就可以编辑引导程序变量.

Just download the sass source, import it and then you can edit bootstrap variables.

这篇关于引导程序自定义SASS变量覆盖无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆