我尝试使用Assetic将我的css和scss文件合并为一个,但是在编译期间有一个错误。当我进入控制台时: php app / console assetic:dump
我的代码:
{% stylesheets
"@PortalSlubnyMainBundle/Resources/public/scss/main.scss" filter="compass"
"@PortalSlubnyMainBundle/Resources/public/css/*"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
答案 0 :(得分:-1)
好的,我找到了解决方案。 1.首先将jquery-ui-1.10.3.custom.min.css重命名为jquery-ui-1.10.3.custom.min.scss 2.第二,感谢scss与css的兼容性,我可以在我的模板文件中执行这样的操作:
{% stylesheets filter='?uglifycss' filter="cssrewrite" filter="compass"
"@PortalSlubnyMainBundle/Resources/public/scss/settings.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
settings.scss
/* foundation files */
@import "foundation";
/* compass specific files */
@import "compass/css3/images";
/* portalslubny variables files - must be imported before scss files */
@import "variables.scss";
/* other css files converted to scss */
@import "jquery-ui-1.10.3.custom.min";
/* portalslubny scss files */
@import "main.scss";
@import "header.scss";
@import "footer.scss";