I'm migrating from Bootstrap 3 to 4 and trying to understand the differences when it comes to the grid.
https://getbootstrap.com/docs/4.0/layout/grid/
It says:
Thanks to flexbox, grid columns without a specified width will automatically layout as equal width columns. For example, four instances of
.col-sm
will each automatically be 25% wide from the small breakpoint and up.Column classes indicate the number of columns you’d like to use out of the possible 12 per row. So, if you want three equal-width columns across, you can use
.col-4
.
Given this, what would be the difference between using:
- Four instances of
.col-sm
- Four instances of
.col-3
Both of these would occupy 25% width of a .row
. Correct?
So what's the difference between specifying it either way?
In Bootstrap 3 you had to use the specific numbers within a 12 column grid, e.g. using 4 instances of .col-sm-3
meant you would have 4 (25% width) columns since 12/3 = 4