0
votes

I am programming in Symfony2 and I have created in app/Resources/assets directory the folders: css and js, where I have created some css and js files. I have compressed and added them to web folder following instructions in http://symfonybricks.com/es/brick/smart-use-of-assetic-to-compress-javascripts-and-stylesheets. (After executing the following command , they are already created in web folder)

php app/console assetic:dump

The problem is that when I use in my index.html.twig file (which is in a bundle inside src directory) a class that I have created in my main.css file (in app/Resources/css), it is not taking the style.

Am I doing anything wrong?

1

1 Answers

0
votes

The setup that you are using is very common in Symfony application. In fact, is the one used by the Symfony Demo Application which is an application used to show the recommended way to develop Symfony applications.

Regarding the error that you are facing:

  • You say that the assetic:dump command correctly generates the files in web/. Can you check the contents of those generated files?
  • You say that "is not taking the style". can you check with your browser inspector to see if the style is correctly applied but overridden by other styles or if it's indeed not applied by any CSS rule?