metaskills/less-rails — Issue #13: one level of redirection needed in order to get @imports to operate properly
Author: shorrockin
Created: 2011-11-30 19:20:49+00:00
State: open

If you have a file like the following file, let's call it **main.css.less**:

@import "variables.less"
@import "a.less";
@import "b.less";
@import "c.less";

Any variables imported through the variables.less file will not be accessible to a, b, or c. To get this to function, you need to add 1 level of indirection, that is (for example) - renamed **main.css.less** to **imported.less**, and create a new **main.css.less** that does something like:

@import "imported.less"

While these two scenarios are semantically equivalent only the second scenario functions without errors.