Difference between Bootstrap 4 & Bootstrap 5

 Difference between Bootstrap 4 & Bootstrap 5



In this short write-up, we are about to have a short discussion on how Bootstrap 4 differs from Bootstrap 5.

Bootstrap 4 uses Jekyll software. Bootstrap 4 now has much more special features such as cards, flexbox, Sass integration and robust plugins built using jQuery.


Bootstrap 5 uses Hugo software. Bootstrap 5 helps activate responsive font sizes, Disabled JQuery, Moved forward to Vanilla JavaScript, Updated form elements, Breaking changes in GitHub issues. Removed the support for IE 10 and 11.


Bootstrap 4


Generally, bootstrap 4 contains 5 tiers (xs, sm, md, lg, xl).

They are available in very limited colours.

Utilities in bootstrap 4 cannot be modified.

It supports Jumbotron

Columns can be positioned relative

It has jquery and all related plugins.

It supports both IE 10 and 11.


Bootstrap 5

Bootstrap 5 contains 6 tiers (xs, sm, md, lg, xl, xxl).

Extra colours added with the improved colour palette.

Bootstrap 5 provides liberty to modify and fabricate our utility.

It doesn’t support Jumbotron.

Columns cannot be positioned relative.

Jquery is disabled and moved forward to vanilla JS with some working plugins.

It doesn’t support IE 10 and 11.


Bootstrap 5 new updates

Switch to Vanilla JavaScript :

Bootstrap 5 is removing JQuery as a dependency. It increases the page speed, and it also means a lot that plugins will stop functioning if they need it as well.


Responsive Font sizes :

Bootstrap 5 activates responsive font sizes automatically which will default resize the typography element based on the size of the end user’s viewport through RFS engine or Responsive Font Sizes.

Updated Form Controls :

These updated types of form controls are all developed on entirely definitive, standard form controls and hence we can avoid using additional markups for form controls and labels.


Utilities API : 


An updated utility API has been developed into Bootstrap 5. Sass plays a major role in creating your utilities. Users can also make use of the utility API of Bootstrap to alter or delete the default utility classes.

Change Gutter Width Unit of Measurement :

CSS readily provides multiple ways to point out sizes or lengths of elements using multi-choice units of measurements, likely px, em, rem, % vw, and vh.

Admitting to the fixes renovated on Bootstrap 5’s official Github project tracking board, the gutter width will now be on rem instead of px.

Rem is abbreviated as “root em” which means equal to the measured value of font size on the root element. For example, 1 rem is the same as the font size of the HTML element (most browsers have a default value of 16px).

Custom SVG Icon Library :

In Bootstrap 4 it was demolished and front end developers and designers were in need to rely on free online icon fonts like Font Awesome or use their custom SVG icons to add value to their website views.

In the case of Bootstrap 5, there’s a newly launched SVG icon library finely crafted by Mark Otto, co-founder of Bootstrap.

Remove Card Decks : 


In Bootstrap 4, if you have to set the same measurement of width and height cards that aren’t attached to one another, you need to use card decks. But in Bootstrap 5, the developers have removed the card decks as the new grid system offers the best responsive control. 

Hence, the removal of unwanted extra classes is easily solved via the grid.


New offcanvas component :


A new offcanvas component has been included in Bootstrap 5 which can be used to build expanding sidebars for navigation or shopping carts or offcanvas menu. And so the newly built offcanvas components can be implemented on the left, right, or bottom of the viewport and can be manipulated with data attributes or the JavaScript APIs.


Switching from Jekyll to Hugo :


Bootstrap 4 has been the best technology to integrate with Jekyll through Sass (Syntactically Awesome Style Sheets) but in Bootstrap 5, a major switch from Jekyll to Hugo increases the user's eagerness. Hugo is called “A Fast and Flexible Static Site Generator built with love by spf13 in GoLang”. As same as Jekyll, Hugo is also a static site generator but scri[pted in Go language. 


Class Updates : 


Fewer CSS classes might no longer be available in the new version and some new CSS classes are added to compensate for it.

Removed Classes : form-row, form-inline, list-inline, card-deck

Newly Added Classes :

gx-* classes control the horizontal/column gutter width

gy-* classes control the vertical/row gutter width

g-* classes control the horizontal & vertical gutter width as well

row-cols-auto


Conclusion :


With all the new updates in Bootstrap 5, it’s safe to say that the Bootstrap team is making huge steps to make the framework lightweight, simple, useful and faster for the developer’s benefit.

Comments

Popular posts from this blog

Here are top dos and don’ts of SEO to build you a SEO friendly website

SAP Business Intergration

WooCommerce vs Magento