I'm using rails 3.1.1 and less-rails 2.1.1.
In application.css.less I am loading another less file like so:
//= require layout
In layout.css.less, I'm trying to use image-url like so:
background: image-url("body_background.png") repeat fixed 0 0 #d5d8db;
The background image is not showing up. When I view the css source on the client, I still see image-url("body_background.png") rather than url(/assets/body_background.png).
I definitely have the asset pipeline enabled, and have configured less explicitly as the stylesheet engine.
You should @import the other .less file.
I don't understand. Here you say to require less files from application.css: #11
Does the file containing the @import need to be two levels deep from application.css? In your example less-rails-bootstrap-test project, you have:
//= require tree .
the tree contains bootstrap_test.css which contains:
//= require bootstrap_test/less
bootstrap_test/less.css.less finally contains the @import.
I tried to put @import statements into a file one degree away from application.css, like so:
//= require less
It is not importing anything.
the full file name of the layout file is layout.css.less. i also tried:
I also tried renaming the layout file to layout.less, and using @import "layout", but that didn't work either.
Got this working by adding semicolons to the @import statements and by naming the layout file layout.less.