Sass 如何让文件观察者在SCS中添加供应商前缀?

Sass 如何让文件观察者在SCS中添加供应商前缀?,sass,webstorm,jetbrains-ide,vendor-prefix,Sass,Webstorm,Jetbrains Ide,Vendor Prefix,我在YouTube上观看了这个SCSS速成班,程序员键入了以下内容: body { font-family: 'Montserrat', sans-serif; margin: 0; #bg { clip-path: polygon(0 0, 100% 0, 100% 71%, 51% 100%, 0 100%); background-color: map-get($colors, color-blue); width: 100%; heigh

我在YouTube上观看了这个SCSS速成班,程序员键入了以下内容:

body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  
  #bg {
    clip-path: polygon(0 0, 100% 0, 100% 71%, 51% 100%, 0 100%);
    background-color: map-get($colors, color-blue);
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: -1;
  }
}
他在教程中的CSS输出是这样的:

body #bg {
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 71%, 51% 100%, 0 100%);
          clip-path: polygon(0 0, 100% 0, 100% 71%, 51% 100%, 0 100%);
  ...
}

教程中的人使用的是Visual Studio代码。但在我的例子中,供应商前缀不会出现,因为我使用WebStorm和文件监视程序来编译我的SCSS代码。我该怎么做才能让文件监视者编译我的SCSS代码并自动添加供应商前缀

您正在寻找的是所谓的autoprefixer。 我不熟悉WebStorm,但似乎可以在WebStorm的管道(src.:)中实现autoprefixer

我还建议花更多的时间深入研究一些工具,比如gulp,学习如何使用cli编译sass,而不要依赖任何编辑器

好看