Skip to content

Instantly share code, notes, and snippets.

@Nek-
Last active December 14, 2015 01:49
Show Gist options
  • Save Nek-/5009070 to your computer and use it in GitHub Desktop.
Save Nek-/5009070 to your computer and use it in GitHub Desktop.
{% stylesheets '%kernel.root_dir%/Resources/less/site/frontend.less' filter='lessphp' output='css/style.css' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
// Add it to your composer.json
"leafo/lessphp": "dev-master"
# Example of configuration for symfony/assetic/lessphp
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ FOSUserBundle ]
filters:
cssrewrite: ~
lessphp:
file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php
apply_to: "\.less$" # Apply the filter only on .less file, keep simple css files safe (but less/css are compatible)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment