I\'m using Rails 3 for the first time (especially asset pipelining and less-rails-bootstrap), so I might be missing some really basic concept here. I\'ve tried two approaches fo
Your answer is sufficient if you want to exclusively use the default twitter bootstrap variables. If you find yourself wanting to override the variables and have them applied to BOTH twitter bootstrap's styles AND your own styles, you'll need to do separate out your variables into its own myvariables.less file and have that file included with twitter bootstrap instead of in the manifest.
application.css:
/*
* Notice we aren't including twitter/bootstrap/bootstrap in here
*= require bootstrap_and_overrides
*= require mystyles
*/
bootstrap_and_overrides.less:
# Bootstrap with both bootstrap's variables, and your own
@import "twitter/bootstrap/bootstrap";
@import "myvariables";
mystyles.less:
# Your styles with both bootstrap's variables, and your own
@import "myvariables";
h1 {
// Use
color: @textColor;
}
myvariables.less:
@import "twitter/bootstrap/variables";
@textColor: green;