如何从 Compass 输出压缩的 CSS?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2335920/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 21:37:36  来源:igfitidea点击:

How do I output compressed CSS from Compass?

csscompressionsasscompass-sass

提问by Mark Robinson

How do I configure compass to output smaller or compressed CSS files? I tried compass -s compressedbut that didn't work.

如何配置指南针以输出较小或压缩的 CSS 文件?我试过了,compass -s compressed但这没有用。

回答by Rob Wilkerson

In your config.rbfile:

在您的config.rb文件中:

output_style = :compressed

More at http://compass-style.org/help/documentation/configuration-reference/.

更多信息请访问http://compass-style.org/help/documentation/configuration-reference/

回答by svassr

Did you try with the full name of the argument in command line ?

您是否尝试在命令行中使用参数的全名?

compass watch --output-style=compressed

回答by Gavin Bruce

i use the following terminal command

我使用以下终端命令

compass compile -e production --force

reference: http://compass-style.org/help/tutorials/production-css/

参考:http: //compass-style.org/help/tutorials/production-css/