bootstrap 4 scss主题颜色覆盖

时间:2019-04-23 02:12:43

标签: bootstrap-4

让我的scss文件正确安装,但在下面的代码中,.header-top上的background-color仍然从原始的scss文件中提取颜色,而不是主题颜色变量i上的橙色写。

// Variable Overrides (This needs to be before the @import below that 
imports all bootstrap sass files)
$greyLight: #f7f9fc;

// $theme-colors: (
//     "primary": #0077bc,
//     "secondary": #585858
// );

$theme-colors: (
  "primary": #d95700,
  "secondary": #585858
);

$primary: theme-color("primary");

// MY STYLES
.header-top {
    background-color: $primary;
    color: white;
    height: 40px;
}


// Bootstrap Sass files ( @import imports everything below)
@import "node_modules/bootstrap/scss/bootstrap";

0 个答案:

没有答案
相关问题