qbbr.io / blog

Tags: , , ,
Source: markdown

install (node.js + npm required):

$ sudo npm install -g less

configure:

add less filter to assetic configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# app/config/config.yml
# ...
# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    filters:
        cssrewrite: ~
        less:
            node: /usr/bin/node
            node_paths: [/usr/lib/node_modules/]

using:

twig:

1
2
3
4
5
6
{% stylesheets filter='less'
    '@QcmsAdminBundle/Resources/public/less/layout.less'
    '@QcmsAdminBundle/Resources/public/less/left-menu.less'
%}
    <link rel="stylesheet" href="{{{{ asset_url }}}}">
{% endstylesheets %}
comments powered by Disqus
On your computer does not found Web Browser!
Plz install it.
Firefox
Chromium
Google Chrome
Safari
Opera