0

I have a question about relative paths for '@import' statements for the play! framework's greenscript module. Specifically, I have a 'main.less' file which imports all of my other less files via this syntax:

 @import "variables.less";
 @import "mixins.less";
 @import "stuff.less";...

In dev mode, these files all return 404s, and they are being looked for in the greenscript minimized directory ('public/gs' by default). Does anyone know how to have them imported relative to main.less? Thanks for your help!

1 Answers1

0

Try not use @import inside less files. Instead, use ${greenscript.@import} inside your view files. See the less-and-coffee sample provided in greenscript module distribution.

Gelin Luo
  • 14,035
  • 27
  • 86
  • 139
  • Thanks so much for the response. Unfortunately, I have looked in the `less-and-coffee` samples and I'm seeing `@import` statements in the less files. tab.less has 2 import statements for example. This is basically exactly what I want to do. In addition, I can't seem to get the greenscript.@import tag to output anything. Any additional help would be greatly appreciated. Thanks again. – iamaracinghorse Aug 08 '12 at 22:29
  • the @import statements in less files has no use. If you remove them the result will be the same. greenscript.@import tag tells greenscript engine to process the imported less files while compiling less files – Gelin Luo Aug 10 '12 at 00:02