本文介绍了Compass,config.rb并获取输出实际:compressed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的config.rb
This is my config.rb
preferred_syntax = :sass
http_path = '/'
css_dir = 'css'
sass_dir = 'sass'
images_dir = 'assets/images'
javascripts_dir = 'js'
relative_assets = true
line_comments = false
output_style = :compressed
事情是代码不会被压缩,块:
The thing is that the code won't be compressed, sample of few blocks:
/* line 37, ../sass/style.scss */
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a {
color: #363636;
}
/* line 37, ../sass/style.scss */
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
color: #cd0a0a;
}
/* line 37, ../sass/style.scss */
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a {
color: #cd0a0a;
}
/* line 37, ../sass/style.scss */
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text {
color: #cd0a0a;
}
/* line 37, ../sass/style.scss */
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary {
font-weight: bold;
}
/* line 37, ../sass/style.scss */
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary {
opacity: .7;
filter: Alpha(Opacity=70);
font-weight: normal;
}
任何想法我在这里失踪了什么?
Any idea what am I missing here?
推荐答案
config.rb只有在运行 compass
命令时才会读取。如果您使用指南针观察
,您需要停止并启动它,之后更改才会生效。您可能还需要通过对您的一个Sass文件进行一个小的更改来强制重新编译。
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.
这篇关于Compass,config.rb并获取输出实际:compressed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!