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.
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
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 :
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.