变量不';t在Symfony2中使用assetic在partials中工作

变量不';t在Symfony2中使用assetic在partials中工作,symfony,assetic,compass,Symfony,Assetic,Compass,我有一个使用compass和assetic的Symfony2项目(至少也在尝试) 我有一个名为app.scss的主文件,其中包含所有部分和指南针的导入,它可以正确编译,但当我在一个部分中创建变量并尝试在另一个部分中访问它时,我会得到一个错误,如下所示: Line 63: Undefined variable: "$row-width". app.scss将如下所示: @import "compass"; @import "settings"; //here I have my variabl

我有一个使用compass和assetic的Symfony2项目(至少也在尝试)

我有一个名为app.scss的主文件,其中包含所有部分和指南针的导入,它可以正确编译,但当我在一个部分中创建变量并尝试在另一个部分中访问它时,我会得到一个错误,如下所示:

 Line 63: Undefined variable: "$row-width".
app.scss将如下所示:

@import "compass";
@import "settings"; //here I have my variable
@import "foundation/bower_components/foundation/scss/normalize";
@import "foundation/bower_components/foundation/scss/foundation";

@import "fonts";

@import "home"; //here I try to call the same variable that gives the error
部分中的其他css工作正常,除了compass mixin,如果我尝试在其中一个部分中调用mixin,我会得到类似的“未定义”错误

我的config.yml是这样的:

# Assetic Configuration
assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ ]
    filters:
        cssrewrite: ~
        compass: 
            load_paths:
                 - '%kernel.root_dir%/../web/foundation/bower_components/foundation/scss'
            apply_to: ".(scss|sass)$"
最后,在我的脑海里:

{% stylesheets 'scss/*' filter='compass' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
无论如何,当我在浏览器上看到代码时,只有对主css的调用:

 <link rel="stylesheet" href="/css/1a73e0a.css" />


这个问题似乎与我的问题相似,但也没有得到回答:

好吧,在我开始悬赏时,我找到了一个解决方案:

{% stylesheets 'scss/app.scss' filter='compass' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{%stylesheets'scss/app.scss'filter='compass%}
{%endstylesheets%}

因为我只需要编译一个SCS(其余的都是部分的),所以我需要指定它,这样它只编译该文件,导入开始正常工作,并且变量可以在所有的SCS上使用(当然,如果它们以前声明过的话)你可以设置你的设置文件吗?设置文件是基础的正常设置文件,它有很多变量,其中一个是行宽。正如我在问题中所说,这个问题也发生在compass的任何混音中,所以我的部分音不能从彼此那里获得信息。我会用更多信息更新我的问题。
{% stylesheets 'scss/app.scss' filter='compass' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}