0

这是我的 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

问题是代码不会被压缩,几个块的示例:

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

知道我在这里想念什么吗?

4

1 回答 1

2

config.rb 仅在compass命令运行时读取。如果您正在使用compass watch,则需要在更改生效之前停止并启动它。您可能还需要通过对其中一个 Sass 文件进行微小更改来强制它重新编译。

于 2013-11-05T19:52:01.250 回答