Feb
New Features of Bootstrap 4 Web Development Framework
Bootstrap 4 is the world’s most popular framework for designing responsive mobile applications & user interfaces. The Bootstrap team has finally announced its release on January 19, 2018 with the key improvements & new advanced features. It is built by Mark Otto, fat and its core team of developers. Bootstrap 4 is an open source framework which provides responsive grid system, prebuilt components, SASS variables, mixins to develop projects with JS, HTML and CSS. The Bootstrap team has achieved a huge milestone by performing a major rewrite for the entire project and improved the framework by squashing the bugs.
Bootstrap 4 contain print styles and utility classes in which the print display utilities include the new display values similar to standard display utilities. The printed pages are now rendered in reasonable sized instead of being rendered as mobile devices. Let’s go through some major changes in Bootstrap 4:
1. Bootstrap Reboot Functionality
In Bootstrap earlier versions, Normalize.css was the dependency in the bootstrap. It was used for rendering the consistent appearance of all HTML elements. The bootstrap team has removed some portion of the dependency & mixes it with the Bootstrap reboot. The reboot is now used as the better & stable normalization approach. Reboot is a collection of files that contain CSS elements to provide an elegant, consistent and simple baseline. The Reboot was build upon normalize.css which provides many HTML elements styling. The useful guideline for choosing override:
- Update the browser default values to use rems instead of ems for scalable component spacing.
- Avoid margin-top. Vertical margins can collapse; a single direction of margin is a simpler mental model.
- Block elements should use rems for margins as well as for easier scaling across device sizes.
- Keep font-related properties & its declaration to a minimum using inherit.
2. Grid System Improvements
In Bootstrap version 4, the grid system has become the 5 tier grid system which includes xs, lg, xl, md, and sm. The new grid tier xl has been introduced to extend the media query range to 544px. The improved grid system offers support for flexbox in the predefined classes & grid mixins. The system also supports alignment of classes as vertical & horizontal. The changes in the media queries have been made to avoid the repeat of query declarations.
Check out the Bootstrap 4 Grid Demo here
3. Major Browser Support
Bootstrap 4 offers support for iOS7+ and Internet Explorer 10+. It also introduced the official support for Android v5.0 Lollipop’s Browser and WebView. If you are building applications using Bootstrap version 3, then your application need support for IE8, IE9 and iOS 6 browsers. Bootstrap 4 has dropped support for these browsers.
4. Bootstrap 4 Advanced Flexbox
In Bootstrap 4, Flexbox ships lot of amazing features which makes the bootstrap a powerful framework. It offers Flexbox based grid, auto margins, vertical centering, auto layout grid, responsive sizing and floats etc. It also powers the new card components with new spacing utilities.
5. Improved Form Support
The form classes have been modified in Bootstrap 4. The default radios and checkboxes have been rewritten to have the same layout style. The form classes support:
- .form-group-* classes are now .form-control-* classes.
- .input-lg and .input-sm is now become as .form-control-lg and .form-control-sm.
- .control-label is now .col-form-label.
- No more used for .radio-inline and .checkbox-inline
- .help-block is now become the .form-text for block-level help text. Utility classes like .text-muted used for inline help text.
- .col-form-legend no longer in use.
- The .checkbox and .radio classes have transformed into .form-check and the various .form-check-* classes.
- .has-error, .has-warning, and .has-success classes replaced with HTML5 form validation & CSS pseudo-classes.
Check out more information on improved form support
6. SASS Flexible Performance
SASS is syntactically awesome style sheets language compatible with all versions of CSS. In Bootstrap 3, the use of source CSS files is very less. But in Bootstrap 4, the SASS is used for source CSS files. Many front-end developers support for SASS due to its flexible nature and faster compilation.
7. Introduced New Card Components
Bootstrap 4 introduced the new card components by dropping support for thumbnails, panels and wells. The card component provides the extensible and flexible content container with multiple options. It includes the variety of options for background colors, footers, headers and powerful display options. The thumbnail, panel and well functionality are available as the class modifier for cards as:
<div class="card"> <img class="card-img-top" src="https://res.cloudinary.com/unicodeveloper/image/upload/c_fill,h_800,w_600/v1525417910/Screen_Shot_2018-02-02_at_6.17.49_PM_v4xpp9.png" alt="Card image cap"> <div class="card-body"> <h5 class="card-title">Profile Pic</h5> <p class="card-text"> Uk developer</p> <a href="#" class="btn btn-primary">Visit Profile</a> </div> </div>
- class=”card-body” – building block.
- class=”card-header” – header within a card.
- class=”card-footer” – footer within a card.
- class=”card-info”
- class=”card-inverse”
- class=”card-warning”
- class=”card-danger”
- class=”card-success”
These classes are available for styling the header, border, footer, inverse and many other elements.
8. Responsive Spacing Utilities
The Bootstrap 4 has the plethora of responsive margin & utility classes that helps to modify element appearance. It works by assigning padding values & responsive margin to an element in shorthand classes. It includes support for individual properties, horizontal and vertical properties. The classes are built from the SASS map which is ranging from .25rem.
Example:
.mt-0 { margin-top: 0 !important; } .ml-1 { margin-left: ($spacer * .25) !important; } .px-2 { padding-left: ($spacer * .5) !important; padding-right: ($spacer * .5) !important; } .p-3 { padding: $spacer !important; }
Bootstrap 4 came with the significant improvements and newly released features. The bootstrap team focused on the concepts and strategies for responsive CSS. If you want your website to be designed and developed in latest Bootstrap 4 version then we are here for you – FiCODE, a web development company London. Our expert team works on Bootstrap 4, PHP, JavaScript, Android & iOS applications a lot more.