SASS inserts code comments periodically into my compiled CSS

社会主义新天地 提交于 2019-12-12 01:13:12

问题


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 */

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


回答1:


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


来源:https://stackoverflow.com/questions/16548458/sass-inserts-code-comments-periodically-into-my-compiled-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!