【问题标题】:Symfony/Less @icon-font-path is undefined in glyphicons.lessSymfony/Less @icon-font-path 在 glyphicons.less 中未定义
【发布时间】:2014-04-06 16:19:52
【问题描述】:

我使用 Symfony 2.4 并安装了捆绑包 MopaBootstrap。

少说:NameError: variable @icon-font-path is undefined in glyphicons.less on line 13, column 8. 这是一个 mopabootstrap 文件。

我扩展了“MopaBootstrapBundle::base_initializr.html.twig”。我没有特定的代码,这是一个新项目。

除了 bootstrap glyphicons 文件之外,我的所有代码都不太好用。

有什么想法吗?

编辑:如果您有一些想法,这里有一个未解决的问题:https://github.com/phiamo/MopaBootstrapBundle/issues/839#issuecomment-39893655

【问题讨论】:

    标签: php twitter-bootstrap symfony less


    【解决方案1】:

    我删除了 config.yml 中的 'apply_to: ".less$"' 并将 less 过滤器添加到我的 twig 标签中。现在assetic:dump --watch 似乎工作正常。


    config.yml

    assetic:
    debug:          %kernel.debug%
    use_controller: false
    filters:
        less:
            node:       /usr/local/bin/node
            node_paths: [/usr/local/lib/node, /usr/local/lib/node_modules]
            apply_to: "\.less$" <<<<< Remove this line
    

    Base.html.twig

    {% stylesheets
        '@MopaBootstrapBundle/Resources/public/less/mopabootstrapbundle.less'
        filter='less' <<<<< Add this line
    %}
        <link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
    {% endstylesheets %}
    

    【讨论】:

      猜你喜欢
      • 2013-10-27
      • 1970-01-01
      • 2013-10-12
      • 2020-07-27
      • 2013-12-22
      • 2021-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多