SASS定期将代码注释插入我的已编译CSS中 [英] SASS inserts code comments periodically into my compiled CSS

查看:97
本文介绍了SASS定期将代码注释插入我的已编译CSS中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道SASS为什么这样做以及如何防止它-我正在使用Scout管理我所有的Sass / Compass项目。在 sass文件夹中,我有一个main.scss文件,该文件导入了partials / reset.scss文件。它们分别编译为../css/main.css和../css/partials/reset.css。但是在两个已编译的CSS文件中,都有类似这样的定期注释:

just wondering why SASS does this and how to prevent it - I'm using Scout to manage all my Sass / Compass projects. Inside a "sass" folder I have a main.scss file which imports a partials/reset.scss file. These compile to ../css/main.css and ../css/partials/reset.css respectively. But in both of the compiled CSS files, there are periodic comments like this:

/* line 13, ../../sass/partials/reset.scss */

/* line 24, ../../sass/partials/reset.scss */

如何防止它添加这些注释?它们不在scss文件中。

How do I prevent it from adding these comments? They're not in the scss files.

推荐答案

这些行注释表示生成这些样式的代码从何而来。您可以通过在config.rb中取消注释此行来禁用它:

Those are line comments that indicate where the code that generates those styles comes from. You can disable it by uncommenting out this line in your config.rb:

# line_comments = false

这篇关于SASS定期将代码注释插入我的已编译CSS中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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