Using rails 3.1 and less-rails (>= 2.1.1):
Is anyone out there successfully using @import to include local .css.less files? I’m using the following file structure to try to do so:
application.css:
//= require less
less.css.less:
@import "layout"
layout.css.less:
body {
background-color: white;
}
However the contents of layout.css.less never get loaded. I also tried importing “layout.css” and “layout.css.less” to no avail.
I know that less.css.less gets loaded because if I put some css in there, it gets loaded.
I’m using @import to include the layout.css.less file because (ultimately) I’m trying to use the asset helper image-url, and the author of less-rails told me I need to use @import here
UPDATE:
I added a semicolon to the @import statements, and now rather than nothing from the less.css.less file being loaded, I see the @import statements themselves in the loaded stylesheet.
I got this working by renaming the layout.css.less file to layout.less