Open SimonHarte opened 11 years ago
This is because less file are compiled separately, not together. To access mixins from other less files, you need to use the import feature of Less
Thanks for the response stof, I know that, but it would be awkward to maintain if we had to @import all our module styles in project.less, especially because they aren't fix, they get added and removed during development...
I'm not totally sure if this is a "problem" with assetic, but in case of less, the files should be merged together and then passed to the compiler.
@BuschFunker the issue is that if you merge the files together and then pass them to less, it will break the import statements in them when the files you are merging together are not in the same folder
@stof Since the idea behind giving multiple resources is not having to @import files in other folders, this wouldn't be a problem. The only @imports we have here for example are in project.less, which just bundles general files like yui reset, grid and elements stylesheets in the same folder.
{% stylesheets '../src/Terrific/Composition/Resources/public/css/project.less' '../src/Terrific/Module//Resources/public/css/.' '../src/Terrific/Module//Resources/public/css/skin/.' filter="less" output="css/compiled/base.css" %}
.linear-gradient() defined in project.less, used in module grid.less
[exception] 500 | Internal Server Error | RuntimeException [message] NameError: .linear-gradient is undefined in grid.less:14:2