Vivendi
Vivendi

Reputation: 21017

Changing bootstrap theme and colors

Twitter Bootstrap comes with its source code in the form of Less files. So if I want to change the default size of the top navbar for instance, then I'd have to (as far as I understand) do this in the theme.less.

But what if I'd like to change some default colors as well. These are defined in the variables.less file. Should I alter that file? Or should I (in the form of good practice) override them (if that's even possible) in the theme.less file as well?

I'd like to know the good approach for this, because I'd like to create my own Bootstrap theme.

Upvotes: 1

Views: 1098

Answers (1)

avcajaraville
avcajaraville

Reputation: 9084

What we do at our team (and best practice) is to include a custom variables files at the bottom of all bootstap's imports. This way, all variable you declared will overwrite bootstrap's default and you will not being overwriting bootstrap, what will give you the possibility of update without conflicts.

Upvotes: 3

Related Questions