Answer the question
In order to leave comments, you need to log in
Symfony 2 Assetic + compass filter?
Hello.
I honestly surfed the Internet, but I did not find information on how to set up the Assetic compass filter. What I need is an analogue of output_style from config.rb (I want to use compressed). Everywhere they suggest using yui_css, in the Symfony documentation - UglifyCSS. That is, two different components for one task, it turns out. And I would like, if possible, to use the capabilities of Compass itself.
Do you have any thoughts on this topic? Thank you.
Answer the question
In order to leave comments, you need to log in
Compass is a set of components for sass . To work with sass / scss , symphony has a filter built into assetic , which can be styled in the config (just what you are asking about) and allowed to use a compass.
An example of my assetic setup where I asked it to automatically apply scss to files ending in .scss .
app/config/config.yml
assetic:
filters:
scss:
style: 'compressed'
compass: true
apply_to: "\.scss$"
Style output now works like this:
{% stylesheets '@ApplicationBundle/Resources/public/scss/style.scss' %}
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" />
{% endstylesheets %}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question