Dec 02, 2016


Bootstrap has surely been the most proliferating and one of the most popular CSS frameworks in the last couple of years. It owes it to its simplicity, flexibility and integration capabilities.

One of the things that catch the eye at first glimpse is that it is written in SCSS. We have seen many changes since the first version of the framework and so many functions have been implemented that people seem to have forgotten the times where some fonts, listing and grids were the only things that we had. Then came flat design, along with numerous improvements in stability and compatibility, at the expense of the ending of support for old web browsers, which in the HTML5 era is something that really has to be done.

What’s New?

Less has been one of the most essential foundations of Bootstrap. Nothing is forever, so we now see a complete move to Sass, in contrast to the dual nature of Bootstrap 3 where one could decide which version to download. Sass can be compiled faster and enjoys a far larger popularity than Less, so that’s no surprise. The variables for gradients, transitions and other visual features have been moved in one place to a file and can be converted to Sass variables if one wants.


Grids

Classes were one of the most essential features of grids in Bootstrap 3, where we used them to target specific elements and control their sizes on different screen sizes. In the fourth version there is a special smaller, or –sm tier that is specifically oriented towards mobile devices. Keeping typography in mind, they are now measured in rem and em units in contrast to pixels.


IE8 Support

It is gone. IE8 doesn’t support CSS media queries and so it does not include one of the most crucial features that control responsive design under the hood of Bootstrap. Since the new framework is oriented towards the future, the support of browsers that are part of old operating systems is pointless.


Glyphicons

Glyphicons will be dropped from the Bootstrap 4 core. Icon options include, but are not limited to:


Optional Flexibox Layout

Flexibox is a CSS option that allows for flexible layouts. Content can be aligned within a parent element with equal height columns in layouts that rely on grids.

One must open the .scss file, find the Boolean $enable-flex and change it from false to true. Then just recompile and Flexibox mode is enabled.


Cards

This is one of the brand new feature. A card can be used as a page or as a container, alternatively. Panels, wells and thumbnails are no more. A card can contain text, links, footers, headers and whatever else comes to mind.

Popovers and Tooltips

Tether is a third party library that works for the improvement of tooltips and popovers. The new feature can be used by including tether.min.js just before bootstrap.min.js.


Inverse Class for Tables

A new prefix –inverse can give a background to the entire table.


Media Queries

Pixels were used in Bootstrap 3 for control of the responsive layout. Bootstrap 4 uses em for that.


New JavaScript Plugins

The new version is more powerful with all the plugins rewritten with ES6, including UMD support, methods, options, etc.

For more complex scenarios, you can use 3rd party frameworks like Shield UI, which provide rich JavaScript HTML components for data-visualization like Charts and Grid, as well as many other widgets.


Converting Bootstrap 3 Code to Bootstrap 4

There is a lot of Bootstrap 3 code all over the Internet. Web developers and designers will slowly have to start thinking about migrating their existing web pages to Bootstrap 4, as it will be the next industry standard for responsive and mobile-first design.

One popular tool for converting Bootstrap 3 to 4 markup is the PrepBootstrap Converter. It provides a way to convert any Bootstrap 3 piece of HTML to version 4 and preview the resulting code in a new window.

Another great feature of that tool is that it has already been integrated with the existing Bootstrap Templates on PrepBootstrap, originally implemented and available for download for Bootstrap 3. With the simple click of a button, web designers can now convert the hundreds of templates to Bootstrap 4 and start integrating them in their projects right away.


Conclusion

Bootstrap 4 features so many new things that it’s really hard to decide which one is the most important. Looking even further into the future, Bootstrap 5 will probably have many things like classes or prefixes changed altogether. Old browsers will likewise be dropped once more, because their support serves nothing and only complicated development, taking attention away from new browsers.