Using compass / sass with Symfony 2

I searched for the answer to this question, but did not find exactly what I was looking for.

I dip my toes in the water of the Symfony framework, using CodeIgniter for several years. I like the "bundle" approach so far, except that I have a few problems with processing assets, in particular css files.

I use the Compass framework and, as a rule, create a directory structure using partial directories that compile to one main stylesheet. However, since my Symfony project is bundled, I would like (and probably should) keep css for each package in the package and only have global template material in the main "web directory". My problem is that ...

If I have a compass project setup in my "web directory", how do I include partial parts from my individual packages?

I thought that for each package I create, there are separate compass projects, but how would I combine them into one compressed file? Why should I use Assetic? Is this overtly organizational busting?

Any suggestions from others who find themselves in a similar situation will be gratefully accepted!

+5
source share
2 answers

/. , , , Compass css ( /Resources/public. Assetic "" ( , ) -, .

0

Assetic Sass.

sass , assetic .

( ):

{% stylesheets filters="compass"
    "@AlomMainBundle/Resources/assets/css/main.sass"
    "@AlomMainBundle/Resources/assets/css/header.sass"
    "@AlomMainBundle/Resources/assets/css/footer.sass"
%}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

, , : http://alexandre-salome.fr/blog/Sass-Compass-Assetic-In-Ten-Minutes

+6

All Articles