What should I use between bootstrap.min.css or bootstrap.css?
I am confused between the two files because bootstrap.css
is readable i.e. scrollable up & down. But the bootstrap.min.css
is hard to edit since you can only scroll it left and right.
min. css has no line spaces, comments or structure. A . min file is a file that is compressed to be smaller by removing comments and line spaces and should be use in your production version of your website/application to cut down on server and browser load.
CSS is a pure CSS framework. That means it only uses HTML and CSS — not JavaScript. Bootstrap, on the other hand, uses HTML, CSS, and JavaScript. It's important to note, however, that Bootstrap is primarily built with HTML and CSS.
What is Bootstrap? Bootstrap is a free front-end framework for faster and easier web development. Bootstrap includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals, image carousels and many other, as well as optional JavaScript plugins.
.css is a stylesheet file and .js is javascript file. all javascript components of bootstrap are bundled into bootstrap.min.js. Follow this answer to receive notifications.
bootstrap.min.css
has been minified. This means all the whitespace and other extra characters have been removed. This is commonly done for use in production, to reduce the size of the file. When developing, it is usually helpful to use the unminified version, since, as you said, it is readable.
The way it works is that it takes all variables (for example number
, tableName
) and converts it to shorter names (in this example, it renames number
to a
, and tableName
to b
), so that the file becomes a little smaller (from 220 MB to 219 MB), that's essentially what it's doing, of course it does more, but this is one part where you can grasp what it does.
That's why there's no white spaces, because a whitespace takes up 0.1 MB and it's best without it.
EDIT: As mentioned by DrBeza in a comment, if your intention is to modify the bootstrap.css
file, it is much better practice to create a separate .css
file and add your own css rules that override the defaults. This way, if you update to a newer version of bootstrap, you can simply swap out the bootstrap files, instead of needing to edit the new bootstrap.css
to move your modifications over to it.
They have exactly the same function, but the .min.css
version has been minified, meaning all whitespace has been removed to reduce file size and increase speed.
The normal .css
is better for development if you want to edit and play around with the content, but if you are definitely not going to modify the file, use the .min.css
for slightly better performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With