css - Sass 添加注释指示定义行

标签 css sass compass-sass

<分区>

我不确定发生了什么,但是当我保存我的文件并且它是由 compass 生成时,我在每个声明上方得到注释,指示它是 sass 文件的哪一行,即:

/* line 55, ../sass/app.scss */

此外 - 在我的 config.rb 中

output_style = :compressed

但输出被扩展了。

知道是什么原因造成的吗?

最佳答案

如果在您修改 config.rb 文件时 compass 已经在运行,则必须重新启动 Compass 才能执行更改。

https://stackoverflow.com/a/19797651/2670516

The config.rb is only read when the compass command is run. If you're using compass watch, you will need to stop and start it before the changes will take effect. You may also need to force it to recompile by making a minor change to one of your Sass files.

如果你只是想删除评论那么你可以使用:

line_comments = false

希望对您有所帮助。

关于css - Sass 添加注释指示定义行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24104889/

上一篇:javascript - 容器获得不必要的 margin

下一篇:html - 最后一个子选择器不工作

相关文章:

css - 带有图像覆盖的 IE 悬停问题

css - 无法使用 sass 从 bootstrap 使用 css 类

css - 如何使用 SASS 生成类?

ruby-on-rails - Rails 3.1 compass 和链轮。使困惑

sass - 制作 Sprite 时, compass 在图像前扔正斜杠

html - 包装盒显示 : flex

c++ - 如何使 Angular 落正确显示(看里面的图片)?

html - iOS 12 Safari iframe + 位置 : fixed + translate3d bug

ruby - 您可以配置 Compass 以删除不需要的开发文件,即 sourcemaps 吗?