7

Here are all the less bootstrap variables: http://twitter.github.com/bootstrap/less.html

I've used the bootstrap-sass gem to add twitter bootstrap to my rails app which means I'm using sass. How do I modify/edit these less variables in my bootstrap_and_overrides.css.scss file?

When I try to do something like this:

@navbarBackground: #3D368B;

I get:

Sass::SyntaxError in Pages#home

Showing /Users/justme/myproject/app/views/layouts/application.html.erb where line #5 raised:

Invalid CSS after "@navbarBackground:": expected pseudoclass or pseudoelement, was " #3D368B;"

2 Answers 2

9

Variables in Sass start with a dollar sign ($) not an at symbol (@) which is used in Less.

Try this:

$navbarBackground: #3D368B;
@import "bootstrap";
@import "bootstrap-responsive";
Sign up to request clarification or add additional context in comments.

Comments

4

to modify variables in saas, modify them before importing bootstrap

.alert{
  margin-top:-40px;
}



@import "bootstrap";
@import "bootstrap-responsive";

here in an example in my app

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.