是否可以从Sass处理器中排除/忽略某些CSS文件? [英] Is it possible to exclude/ignore certain CSS-files from the Sass Processor?

查看:772
本文介绍了是否可以从Sass处理器中排除/忽略某些CSS文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是SASS / SCSS。我有一些.css文件,我想被RubySassProcessor忽略。

I'm using SASS/SCSS. I have some .css-files which I want to be ignored by the RubySassProcessor. Does anybody know how to exclude them?

推荐答案

如果在文件名前面添加下划线,它将被忽略,但可以

If you add an underscore in front of the filename it will be ignored, but can then be added as a partial using @import.


  1. 将filename.scss重命名为_filename.scss

  2. 可选:将以下内容添加到要包含它的文件中:

  1. Rename filename.scss to _filename.scss
  2. Optional: Add the following to a file you want to include it in:

@importfilename

@import "filename"

这也将有效地忽略css文件,因为它不会将scss文件中的更改编译为css文件。

This will also effectively ignore the css file, since it will not be compiling changes from the scss file to the css file.

这里可以看到更深入的解释:
Webstorm 6 - 如何让scss文件监视器忽略文件

A deeper explanation can be seen here: Webstorm 6 - How to make the scss file watcher ignore files

这里在Partials部分:
http://sass-lang.com/documentation/file.SASS_REFERENCE.html

And here in the Partials section: http://sass-lang.com/documentation/file.SASS_REFERENCE.html

这篇关于是否可以从Sass处理器中排除/忽略某些CSS文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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