Michael Hang
Michael Hang

Reputation: 199

Bootstrap Stylesheet Organization

I'm currently utilizing the Twitter Bootstrap framework to create a personal website.

I've found, however, that the site looks better with slight tweaks to some of the CSS classes; does it matter (not in terms of functionality, but convention) whether I make these changes within the provided bootstrap.css file or should I move them to a separate file containing solely my changes?

Upvotes: 0

Views: 569

Answers (2)

flangofas
flangofas

Reputation: 332

Actually, it is not recommended to change any framework! For your case, if you need to make a modification it is recommended to run your CSS file right after bootstrap's. As a result, the browsers render the default CSS of bootstrap and then your modifications without any conflict.

For example,

<-- include your bootstrap file --> 
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<-- Your modifications --> 
<link href="yourcssfile.css" rel="stylesheet">

hope this helps.

Upvotes: 2

haim770
haim770

Reputation: 49095

From maintenance point of view, you should put your custom tweaks in a separated CSS file, so (for example) if you'll upgrade/downgrade your Bootstrap version your changes will still be in-tact.

You should also consider, that when dealing with CSS Frameworks, usually you'll have the dev/debug version and the production/minified version. if you change the library code you'll have to take care of all the formats as well (unless you're performing the minification/bundling yourself).

Upvotes: 1

Related Questions