mrdaliri
mrdaliri

Reputation: 7358

customize bootstrap, edit or overwrite

I want to customize my Bootstrap. change font faces (css3 @font-face), change buttons background and etc.

Can I edit bootstrap.css or I should add a stylesheet and overwrite default styles? which one is the best practice?

Upvotes: 0

Views: 833

Answers (2)

Yisela
Yisela

Reputation: 6941

I think it depends on your project (and maybe your personal preferences). Adding an extra css will mean that more information has to be read, but it will also means all you custom styles are more organised and easy to change.

I'd personally keep the original files, and create a new css for the custom styles. Imagine for example if there is a newer version of Bootstrap, you would have to go line by line checking and fixing discrepancies. And I also feel that if someone took the effort to write the original css, it has his/her name 'attached' to it. Modifying it (at least without without commenting your changes) would turn it into a bit of a Frankenstein monster.

I'd say the best practice (for this case or any other similar ones) would be to keep the original file and add your custom styles and in a new css file.

Upvotes: 1

rogMaHall
rogMaHall

Reputation: 691

Someone else had answered the broader part of this question earlier this year:

Bootstrap best practices

Upvotes: 0

Related Questions