用grunt编译.scss到css会返回奇怪的错误



这就是我的grunt里面的内容:

concat: {
      css: {
        src: [
          'assets/**.scss.liquid', 'assets/**.css'
        ],
        dest: 'assets/build.scss.liquid',
      }
    },
    sass: {
      dist: {
        options: {
          style: 'compressed',
          sourcemap: 'none',
          noCache: true
        },
        files: {
          'assets/build.css.liquid':'assets/build.scss.liquid'
        }
      }
    }

SCSS:

.all-collection {
  padding-top: 50px;
  height: 100%;
  width: 100%;
  color: white !important;
  justify-content: center;
  display: flex;
  p {
    color: white !important;
  }
}

这是运行grunt concatgrunt sass后返回的结果:Error: Invalid CSS after "50px": expected expression (e.g. 1px, bold), was ";" on line 2 of all-collection.scss

我试图删除它正在指定的行上的;,但错误只是更改为具有;的下一行。不知道为什么会出现这个错误

通过切换插件解决。我用grunt-sass代替。

最新更新