Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between bootstrap-flex, bootstrap-grid and bootstrap-reboot

In the newest version of Bootstrap (current version at the time of asking the question is [email protected]) there are 3 different files and a standard one:

  1. bootstrap-flex.css
  2. bootstrap-grid.css
  3. bootstrap-reboot.css
  4. bootstrap.css

Are the first 3 files an extension to bootstrap.css (#4)?

I can imagine, that the bootstrap-flex use the features of CSS Flexbox, bootstrap-grid is probably the old and already existing way, but what about bootstrap-reboot?

Which one do I have to include (especially then, if I use ng-bootstrap with Angular 2)?

like image 968
Lonely Avatar asked Nov 27 '16 08:11

Lonely


People also ask

What is the difference between Flex and Bootstrap?

Flexbox. The biggest difference between Bootstrap 3 and Bootstrap 4 is that Bootstrap 4 now uses flexbox, instead of floats, to handle the layout. The Flexible Box Layout Module, makes it easier to design flexible responsive layout structure without using float or positioning.

What's the difference between CSS grid vs flexbox vs Bootstrap?

It's important to understand that Bootstrap 4's grid system is built with Flexbox. What sets Bootstrap apart from using Flexbox alone is the process of writing code. With Bootstrap, you can create a grid using only HTML. With Flexbox, you must use HTML and CSS.

What is the difference between Bootstrap CSS and Bootstrap min CSS?

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.

Can you use flexbox and Bootstrap together?

Of course, you can use both in a project. A lot of people is doing that. In fact for making equal height columns you can use flexbox in bootstrap. Check the code pen link below for better understanding.


2 Answers

Take a look at the source:

bootstrap-flex.scss

Bootstrap with Flexbox enabled

Includes all the imports from the standard Bootstrap project, but enables the flexbox variable.

bootstrap-grid.scss

Bootstrap Grid only

Includes relevant variables and mixins for the regular (non-flexbox) grid system, as well as the generated predefined classes (e.g., .col-4-sm).

bootstrap-reboot.scss

Bootstrap Reboot only

Includes only Normalize and our custom Reboot reset.

bootstrap.scss

The main Bootstrap library

And the answer is yes, the first 3 files are optional for Bootstrap.

The minimum required is bootstrap.css, it already includes bootstrap-reboot.

Replace with bootstrap-grid if you want the Bootstrap's grid only.

Replace with bootstrap-flex if you want to use Bootstrap with Flexbox. It is bootstrap.css with Flexbox features.

like image 87
Nhan Avatar answered Sep 25 '22 21:09

Nhan


As @Nhan said: yes, the -reboot, -flex, and -grid files extend the primary bootstrap.css and if you use one of them, then that file is the only you need to include.

As far as the ng-bootstrap portion of your question, I'm using the same and I've only included the bootstrap.min file as I don't plan to use flexbox and I need more than the grid styles.

Hopefully that adds a bit of clarification about what is strictly necessary within the context of your question.

like image 45
Kate Sowles Avatar answered Sep 23 '22 21:09

Kate Sowles