LoginRadius / engineering-portal

A collection of valuable resources by developers -- for developers -- to share practical learnings, development challenges, and open-source initiatives in dev, QA, Infra, and implementation.
https://www.loginradius.com/blog/
MIT License
93 stars 259 forks source link

Bootstrap 4 vs. Bootstrap 5: What is the Difference? #764

Closed raghunath-r-a closed 2 years ago

Rutam21 commented 2 years ago

@raghunath-r-a I would love to write a blog on this topic. You can assign it to me. Thanks.

raghunath-r-a commented 2 years ago

Hey @Rutam21 This is now assigned to you. Please proceed with an outline and then drafting the blog post.

If you're stuck anywhere or having doubts, please do let us know.

sugatobagchi commented 2 years ago

Hey @raghunath-r-a If Rutam is not working on this, can I start working on it?

Rutam21 commented 2 years ago

Hey @SugatoBagchi , Thanks for your interest. But I am currently working on it. Feel free to pick something else from the available ones. ✌

raghunath-r-a commented 2 years ago

Hey @SugatoBagchi

Please feel free to pick any unassigned topics from here: https://github.com/LoginRadius/engineering-portal/issues/750

If you don't find a topic you're interested in, please do let me know. We can discuss it to take it forward

AnshSSonkhia commented 2 years ago

Bootstrap 4 vs Bootstrap 5 What's happening in Bootstrap 5 for Web Developers

Likewise with any significant form change, a ton has changed in Bootstrap 5 over Bootstrap 4. Here is the rundown of significant contrasts you need to remember when refreshing your old undertakings that are worked with Bootstrap 4 or prior. In case you are beginning another task with Bootstrap 5 or are utilizing Bootstrap formats, remembering these progressions will assist you with settling on a choice about picking Bootstrap 5 over Bootstrap 4.

  1. Vanilla JavaScript rather than jQuery

Since the time Bootstrap was presented, it used jQuery as a reliance to offer unique provisions like menu extension, merry go round, dropdowns and so on Be that as it may, this constrained reliance on jQuery was not preferred by numerous designers who needed to utilize Bootstrap with present day JavaScript structures like React and Vue.js. With Bootstrap 5, they have eliminated this reliance.

Note that this doesn't imply that there is no JavaScript reliance in Bootstrap 5. Practices, for example, dropdown, slider, popover and so forth in Bootstrap 5 relies upon Popper just as its own vanilla JavaScript module. There will be no necessity of adding jQuery. In the event that your venture relies upon jQuery, you can in any case add it.

  1. Program support – IE 10 and 11 help eliminated

With Microsoft moving its endeavors totally towards Edge program, Internet Explorer is quick losing portion of the overall industry. Additionally, Edge has taken on the open source chromium motor which permits it to have all the advanced JavaScript and CSS highlights comparable to most recent rendition of Chrome and Firefox. Given this, Bootstrap group has dropped support for Internet Explorer which permits it to give a cutting edge set of elements like CSS factors, quicker JavaScript and better APIs.

Here is a full rundown of programs that Bootstrap 5 does not help anymore:

Dropped Microsoft Edge Legacy

Dropped Internet Explorer 10 and 11

Dropped Firefox < 60

Dropped Safari < 10

Dropped iOS Safari < 10

Dropped Chrome < 60

Dropped Android < 6

  1. CSS custom properties

On account of dropping help for Internet Explorer, Bootstrap 5 currently upholds custom CSS properties. In Bootstrap 4 root factors were available for just shading and text styles. Bootstrap 5 currently offers CSS factors in a small bunch of parts and format alternatives. For instance, table part utilizes neighborhood factors to make striped, drift capable, and dynamic table styles simpler.

  1. Extended shading range

Numerous CSS structures, for example, Tailwind offer a broad arrangement of shading range which has been very famous with designers. Bootstrap 5 has now extended its shading range to incorporate more tones that are available in various shades, for example, $blue-100, $blue-200, $blue-300, … ., $blue-900. This permits you to handily alter the look and feel of your application while never leaving the codebase. You can without much of a stretch abrogate these tones with your own shading range utilizing the shading conceals generator.

  1. Refreshed Form Controls

Bootstrap 5 incorporates specially crafted structure controls. In Bootstrap 4 the structure controls were utilizing whatever defaults every program gave. In Bootstrap 5 the structure controls will offer substantially more steady look and feel in all programs because of its specially craft.

These new structure controls are totally based on totally semantic, standard structure controls and in this manner there is no need of adding additional markups for structure controls and names.

  1. Utilities API

Another utility API has been incorporated into Bootstrap 5. You can utilize Sass to make your own utilities. You can likewise utilize the utility API of Bootstrap to adjust or eliminate the default utility classes.

You can likewise now utilize the state alternative to create pseudo-class varieties, for example, :drift and :concentration.

  1. Upgraded framework

While Bootstrap 5 keeps the framework structure that was presented in Bootstrap 4, it upgrades it by adding new classes. This would mean less exertion will be needed to move the framework structure from the more seasoned to more up to date form.

Here is the what changed in the Bootstrap 5 network framework:

New xxl framework level.

Drain classes can be included framework utilizing .g* utilities.

Structure design alternatives have been supplanted with the new matrix framework.

Vertical separating classes have been added.

Segments are at this point don't position: relative naturally.

  1. CSS Grid Support

Bootstrap 5 has presented an exploratory form of CSS Grid as a select in substitution to the default network framework. Utilizing it isn't required, but the individuals who administrator CSS Grid over Flexbox might want it.

  1. New offcanvas part and Navbar Offcanvas

A new offcanvas part has been included Bootstrap 5 which can be utilized to make growing sidebars for route or for shopping baskets or offcanvas menu. These offcanvas parts can be put on the left, right, or lower part of the viewport and can be designed with information credits or the JavaScript APIs.

.navbar-extend * classes has likewise been extended to incorporate help for offcanvases inside the navbar. You can wrap your navbar components with the proper offcanvas HTML and point your navbar toggler button to the offcanvas menu for it to work. Peruse the offcanvas navbar docs for more data.

  1. New accordion

Bootstrap 5 adds support for spic and span .accordion part. The new accordion incorporates Bootstrap Icons as chevron symbols showing state and snap capacity. You can likewise utilize .accordion-flush to eliminate the default foundation tone, a few lines, and some adjusted corners to deliver accordions edge-to-edge with their parent compartment.

  1. Skimming marks in Form Inputs

Another skimming mark support has additionally been included bootstrap 5. This conduct is like the conduct shown by numerous material plan UI structures like MDB. Structure approval styles additionally function true to form with gliding marks present.

  1. Placeholder part

bootstrap placeholders

Another placeholders part has been added that permits you to make UI while your application is as yet stacking.

  1. RTL support

RTL in Bootstrap 5

RTL support in Bootstrap 5

Bootstrap 5 currently incorporates RTL support. RTL (right-to-left) support implies that you can fabricate sites in dialects like Arabic, Hebrew, Pashto, Persian, Urdu, and Sindhi. The works in these dialects begins from the right of the page and proceeds to the left which requests it's own particular style settings to oblige with your general plan. Presently that Bootstrap 5 has the RTL support in-form, you will actually want to utilize RTL variants of Bootstrap CSS record to make RTL sites. Actually look at docs and models for RTL.

  1. Simpler customization and theming

Bootstrap 5 offers another Customize segment which develops v4's theming page with more substance and code scraps for expanding on top of Bootstrap's source Sass records. A npm starter project is additionally furnished to assist you with beginning with tweaking Bootstrap quicker. Setting up Bootstrap with Parcel is additionally now archived.

  1. Namespaced information ascribes

Bootstrap uses HTML ascribes to empower JavaScript practices. In Bootstrap 5, all such qualities have been renamed from information to information bs-. Accordingly all information ascribes in Bootstrap 5 not contain bs as an infix. You should do discover all supplant all such information ascribes while moving from Bootstrap 4 to 5, but going ahead this will keep the information property naming of Bootstrap separate from that needed by some other libraries or your own.

  1. Popper.js v2

Tooltips and popovers in Bootstrap are controlled by Popper.js. In Bootstrap 5, v2 of Popper.js has been taken on which brings little breaking changes:

Taken out offset choice from Tooltip/Popover and Dropdown. This would now be able to be accomplished utilizing the popperConfig boundary.

The fallbackPlacement choice has become fallbackPlacements.

Rutam21 commented 2 years ago

@AnshSSonkhia Please work on the tickets that are only assigned to you. Moreover, this is not how you should submit your contributions. Please go through some tutorials and learn about Github and PRs, find some other issue and then raise a PR. This issue is already taken. Thanks.

raghunath-r-a commented 2 years ago

@AnshSSonkhia As @Rutam21 has mentioned, the submission should follow the guidelines specified. We do this to ensure that we can collaborate well with the community and avoid duplication of effort. Please take a look at this master issue for more details.

Rutam21 commented 2 years ago

@raghunath-r-a I have the following headings for my blog. Let me know if they are fine.

Introduction

Getting Started with Bootstrap

Bootstrap Verisons

Bootstrap 4.x

Bootstrap 5.x

Summary

raghunath-r-a commented 2 years ago

@Rutam21 Looks good. You may please proceed with writing the blog. Just to note, please ensure that you include a section that clearly describes the differences between 4.x and 5.x and what one should keep in mind.

themonikanayak commented 2 years ago

I would like to work on this issue. Please assign this to me.

Rutam21 commented 2 years ago

@themonikanayak The issue is already assigned. Feel free to pick some other issue. Thanks.

raghunath-r-a commented 2 years ago

@Rutam21 Your blog has gone live: https://www.loginradius.com/blog/async/guest-post/bootstrap4-vs-bootstrap5/

Please feel free to share it with your network!