Bootstrap has been most trusted open source front-end-framework to develop responsive, mobile-first websites. Bootstrap is a famous framework, Why??? Because all it requires is the basic knowledge of HTML and CSS and we can build an attractive and functional website by using pre-defined classes of bootstrap which take care of responsiveness on different devices.
Bootstrap 3 was released in the year 2013 and last stable version Bootstrap 3.3.7 released in July 2016. In October 2014, Twitter announced that Bootstrap 4 was in development. The first alpha version of Bootstrap 4 was released in August 2015. And now in August 2017, Bootstrap 4.0.0-beta version released. You can check out this in-depth Bootstrap tutorial if you want to start learning from 0 .
The center of attention of this post will be the key differences, additions, and subtractions from version 3 to the newly released version 4.0.0-beta.
What Is Different In Version 4 :
Now we can begin to talk about the new features of Bootstrap 4. As technology rapidly evolves, newer and smarter languages are developed to make building clean, fast websites much simpler. Such is the case with the newest release of Bootstrap. The team says that this “version 4 is a major rewrite of almost the entire project”. We will summarize some key changes of this improved.
px
rem
as Bootstrap’s primary CSS unit, though pixels are still used for media queries and grid behavior as device viewports are not affected by type size.Bootstrap 4’s major step towards improvement is its movement towards adopting Flexbox. As part of flexbox, included support for vertical and horizontal alignment classes. Bootstrap 4 positions a lot of emphasis on customization. It’s new grid tier system lets the Bootstrap 4 enjoy the presence of up to 5 grid tiers ( example of 5 tiers : .col-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xl-4 ). One can easily say that Bootstrap 4 provides access to an improved grid system.
In Bootstrap 4, new utility classes have been included without hampering any existing functionality, whatsoever. Such important additions are as that of responsive text alignment classes, responsive floats, and responsive embedding. Apart from offering many shortcuts, these, respectively, allow for changing the alignment of the text, floating of the elements and the scaling of the aspect ratio of any embedded media. (example:.hidden-md-up
hides an element on medium, large, and extra-large viewports. Now, instead of .hidden-md-up
, use .d-md-none
).
.img-responsive
to .img-fluid
..img-rounded
to .rounded
.img-circle
to .rounded-circle
.table-responsive
class should be added to the parent <div>. But in Bootstrap 4 , .table-responsive
class to be added to <table>
element..table-inverse
option..thead-default
and..thead-inverse
.table-
-prefix. Hence,.active
.success
, .warning
, .danger
and .table-info
to .table-active
, .table-success
, .table-warning
, .table-danger
and .table-info.
In Bootstrap 4, Navigation component has been simplified to a great extent. One is required to create a new list of elements employing the latest nav base class. There are some recent additions like nav-link class, nav-item class, and navigation bar styles also.
.navbar-default
is now .navbar-light
, though .navbar-dark
remains the same. However, these classes no longer set background-color
s; instead they essentially only affect color
..navbar-toggle
is now .navbar-toggler
and has different styles and inner markup (no more three <span>
s)..navbar-form
class entirely. It’s no longer necessary; instead, just use .form-inline
and apply margin utilities as necessary.margin-bottom
or border-radius
by default.
Parameters | Bootstrap 3 | Bootstrap 4 |
Source CSS file | LESS | SASS |
Grid Tiers | 4 grid tier system | 5 gid tier system |
Dropdown Structure | Can be created with <ul> and <li> | Can be created with <ul> or <div> |
Default Pagination | .pagination needs to be added to <ul> element | .page-item must be added to to each <li> element and .page-link to each <a> element |
Responsive Images | Apply .img-responsive class | Apply .img-fluid class |
Responsive Tables | .table-responsive class should be added to parent <div> element | .table-responsive class to be added to <table> element |
Navbar Alignment | Employ .navbar-right, .navbar-left to align components | Employ spacing utilities such as .mr-auto, or flexbox alignment utilities |
Glyphicons | Supported | Not Supported |
Media Objects | Includes many different classes for media objects, including .media, .media-body .media-object, .media-heading, .media-right, .media-left, and .media-list and .media-body. | Uses just .media class. Margins can be applied using spacer utilities. Media objects are flexbox enabled in Bootstrap 4, so the various flexbox classes can also be applied (such as reordering, etc). |
Progress Bars | Doesn’t use the progress for progress bars. Instead, applies progress bar classes to nested div elements. | Using the progress element was abandoned in Alpha 6. Bootstrap 4 now uses the div element again. |
As we already told that, Bootstrap team has rewritten the framework. So the above changes are only key changes we wrote here. To read in-depth please follow the link Bootstrap 4.
We have talked about the features that Bootstrap 4 offers. We can see there has been a lot of work is done in optimizing and cleaning up unnecessary elements and classes throughout the entire framework. Bootstrap 4 promises to be much quicker and streamlined for even greater flexibility and ease when creating an awesome mobile-friendly website.
Bootstrap 4, moved to flexbox. This can be considered as one of the biggest and significant achievements. This will provide the following benefits:
Bootstrap has always been easing the lives of the developers and by the updating in the version, now bootstrap has many more new features and options to make things, even more, easier for the developers and that is why people are migrating from Bootstrap 3 to Bootstrap 4 since it is more convenient and accessible that it’s previous counterpart.
Leave a Reply