Dorvalla
Dorvalla

Reputation: 5240

Bootstrap.min.css differs from bootstrap.css

As I was fixing one of my clients website, I bumped into an odd problem, which I reproduced with another site I made as well. It seems that the bootstrap.min.css and the bootstrap.css files are not the same. (well duh) but as in specified code. For example: I found out that the IMG tag is not propperly handled in the bootstrap.min.css file. I cant find the code for it in the min file, while its normally specified in the bootstrap.css file.

The bootstrap.min.css simply states

img {
    border: 0
}

and later adds

img {
    vertical-align: middle
}

while the bootstrap.css applies:

img {
  width: auto\9;
  height: auto;
  max-width: 100%;
  vertical-align: middle;
  border: 0;
  -ms-interpolation-mode: bicubic;
}

For now, I pulled out the piece of CSS specified for the image and put it in my custom stylesheet.

So far this is the only problem I encountered, but somewhere in the back of my head is this voice that whispers: include the other one too, just to catch up any other css problems if they occur...

Whats your oppinion about this? Add the official one too (or toss out the min file and just add the normal one, with making the load time a few miliseconds longer)

Upvotes: 0

Views: 984

Answers (2)

Or Barmatz
Or Barmatz

Reputation: 307

Twitter Bootstrap is a fully functional, heavily used CSS framework. The original code is written in LESS and compiled into CSS for distribution. Part of their compilation includes minifying the full output. This is done using Grunt, a popular NodeJS taskrunner.

There maybe some optimisations in the minified code and hence it seems to vary. Since they also test their code as part of a CI process I feel both the production and minified versions can be trusted.

Checkout their Github and report any issues to them.

https://github.com/twbs/bootstrap

Upvotes: 0

Victor Ramos
Victor Ramos

Reputation: 175

This is a situational problem. You must find out if you're going to be using Bootstrap heavily and often in the future. If that is the case, then you're better off including the non minified version, like you said, in case of future errors. Now, if it is the opposite, then keep the minified version for performance.

Upvotes: 1

Related Questions