3

I'm using the twitter-bootstrap-rails gem (https://github.com/seyhunak/twitter-bootstrap-rails) in my project. The newest version uses the current bootstrap values (base font size 14 and line height 20 ). I want to set these values back to 13 and 18. I thought it would work by putting

@baseFontSize: 13px;
@baseLineHeight: 18px;

into bootstrap_and_overrides.css.less. But that doesn't seem to work. So how can I change them?

Thanks

Jeromy French
  • 11,812
  • 19
  • 76
  • 129
zobel
  • 281
  • 4
  • 17
  • even though you will find how to change them, when you will deploy you'll have to change these values again, because gems are not being uploaded to server(usually), so my advice would be just to user standalone files instead of gem, so even if you change anything, this will work on all other environments/deployments – sanny Sin Jan 10 '13 at 12:25
  • 1
    @sannySin That doesn't make any sense. The changes are made into the project's less files and they get compiled to pure CSS afterwards. – Jiří Pospíšil Jan 10 '13 at 13:27

1 Answers1

3

Actually what you posted works for me. Do you put the two lines at the end of the file? Or more precisely after the bootstrap imports:

@import "twitter/bootstrap/bootstrap";
@import "twitter/bootstrap/responsive";

@baseFontSize: 13px;
@baseLineHeight: 18px;

I will not work if you don't because the variables would get overridden.

Jiří Pospíšil
  • 14,296
  • 2
  • 41
  • 52
  • See http://stackoverflow.com/q/13809895/1430996 for more details about customizing Bootstrap's CSS without altering Bootstrap's LESS files. – Jeromy French Jan 10 '13 at 14:55
  • Thanks for the tip. They were at the end of the file but they were still overwritten because I had accidentally generated a `bootstrap_and_overrides.css` file which had `=require twitter-bootstrap-static/bootstrap` in it. – zobel Jan 10 '13 at 15:47