【发布时间】:2016-01-11 02:23:18
【问题描述】:
我想知道是否可以将 css 和 scss 文件合并为一个。 我使用 Symfony 2.7,我的 config.yml 看起来像这样:
assetic:
assets:
main:
inputs:
- %kernel.root_dir%/../vendor/morrisjs/morris.js/morris.css
- %kernel.root_dir%/../vendor/twbs/bootstrap-sass/assets/stylesheets/*
output: 'css/main.css'
filters:
- sass
- cssrewrite
filters:
cssrewrite: ~
sass:
bin: C:\Ruby21-x64\bin\sass
apply_to: "\.scss$"
当我尝试转储资产时
php app/console assetic:dump
我有一个错误,因为 sass 正在尝试解析 css 文件。 为什么“apply_to”不起作用?
我看到了this post,但它对我没有帮助...
【问题讨论】:
-
你的错误是什么?发布错误文本...
-
这个错误并不重要,这和你尝试用 sass 解析 css 文件时遇到的错误相同:
'Error Output: WARNING on line 1 of C:\cygwin64\tmp\ass2DDF.tmp: This selector doesn't have any properties and will not be rendered. WARNING on line 2 of C:\cygwin64\tmp\ass2DDF.tmp: This selector doesn't have any properties and will not be rendered. Error: Invalid CSS after ".morris-hover": expected selector, was "{position :absol..."