【问题标题】:bootstrap sass error in vscodevscode中的引导sass错误
【发布时间】:2017-12-11 17:59:47
【问题描述】:
@import '../assets/bootstrap/scss/bootstrap.scss';

.col-md {
    background-color: #f00;
}

这是我的代码。 这很简单,但是在 vscode 中有一些错误,如下所示

我无法理解。为什么会报错?

有人知道这个错误吗?

Compilation Error
Error: Invalid CSS after ".col-md {": expected "}", was "{"
        on line 3 of sass/d:\xampp\htdocs\accommodation\theme\accommodation\css\theme.sass
>> .col-md { {

【问题讨论】:

    标签: twitter-bootstrap sass


    【解决方案1】:

    这是导入问题 sass @import 目前无法使用自定义文件正常工作。像这样引用它:

    @import “../assets/bootstrap/scss/bootstrap”;
    

    Jesse Haff 的官方回应 您可以通过在scss/css 文件名的开头添加下划线来@import SCSS 或CSS 文件,并在将其导入样式表时不使用下划线和文件扩展名。 例如: 将样式表命名为:_stylesheet.scss。 然后在 theme.scss 中,像这样引用它: @import “stylesheet”;

    【讨论】:

      猜你喜欢
      • 2023-04-01
      • 2017-08-24
      • 2018-12-09
      • 2016-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-13
      • 2021-06-28
      相关资源
      最近更新 更多