Reputation: 2897
Just dicovered Bootstrap. I noticed that changing default styles requires research. For example right now, I want to change the default colour of buttons' background colour. How can I know the proper way to apply this kind of change?
Upvotes: 0
Views: 45
Reputation: 2072
There are three ways of doing it depending on how you choose to build your website.
If you are directly including bootstrap files:
You have to override the css declaration of each and every style that you wish to change. Tedious but works.
Customize bootstrap in bootstrap's customization page Bootstrap 3 gives a customization page where you can customize the less variables and download it. http://getbootstrap.com/customize/
If you are using less/scss version of bootstrap You can just override/change the variables declaration.
I generally prefer the thrid way of customizing bootstrap. I use sass version of bootstrap available as ruby gems and override the variable declarations.
Upvotes: 1
Reputation: 15279
You can simply change the variables.less file which is provided by Twitter Bootstrap
. Then, you can use LESS to compile it into .css
file.
As you mentioned above, you want to change the default colour of buttons' background colour
. We can simply change the variable's value:
// Buttons
// -------------------------
@btn-font-weight: normal;
@btn-default-color: #333;
@btn-default-bg: #fff;
@btn-default-border: #ccc;
Upvotes: 2