如何让 SASS 在其输出中放置相对路径 [英] How to make SASS put relative paths in its output

查看:172
本文介绍了如何让 SASS 在其输出中放置相对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SASS 生成以下代码:

SASS produces the following code:

/* line 22, B:/home/game/www/sass/field/src/globals.sass */
.small-reports .wrap {
  padding: 2px 0 0;
}

它是否有保留调试信息的设置,但让它看起来像这样?:

Does it have a setting to keep the debug info, but make it look like this?:

/* line 22, /sass/field/src/globals.sass */
.small-reports .wrap {
  padding: 2px 0 0;
}

不同的开发人员在他们的环境中有不同的路径,而将结果文件放在 Git 中很方便.

Different developers have different paths in their environments, while it is handy to have the resulted file in Git.

推荐答案

如果除了 SASS 之外还使用 Compass,则可以使用 relative_assets 属性配置路径是相对的还是绝对的接受一个布尔值.

If you use Compass in addition to SASS you have the ability to configure whether the path is relative or absolute with the relative_assets property which accepts a boolean value.

参见:http://compass-style.org/help/documentation/configuration-参考/

这篇关于如何让 SASS 在其输出中放置相对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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