Css attributes

Bootstrap 5.2.0 strengthens CSS and custom components

With the latest planned update to the Bootstrap web development framework, builders offer CSS variables for all components, along with new wizards and utilities.

Bootstrap v5.2.0-beta1, released on May 13, is called the biggest release of the framework since Bootstrap 5.0 two years ago. Components now include simpler theming and CSS variables to enable real-time customization. Support for color mode, starting with dark mode, will be added soon. Component pages have been updated to include a reference guide to relevant CSS variables. The values ​​of most CSS variables are assigned via Sass variables; customization via CSS and Sass is supported.

To facilitate the modification of custom components, investments were made in version 5.2.0 in wizards and utilities. Here are two examples:

  • The addition of new .text-bg-{color} aids. Instead of individually defining .text-* and .bg-* utilities, developers can now use the .text-bg-* helps to set a background color with a contrasting foreground color.
  • The expansion of font-weight utilities to include .fw-semibold for semi-bold fonts.

Further improvements in this area are expected as development of version 5 continues. Bootstrap v5.2.0-beta1 can be downloaded from the project website. Elsewhere in Bootstrap v.5.2.0-beta1:

  • A new Sass file is introduced with _maps.scss which extracts several Sass maps from _variables.scss to fix an issue where updates to an original map were not being applied to secondary maps that extend it.
  • The Offcanvas component now has responsive variants.
  • The documentation has been redesigned.
  • Buttons and inputs have been refreshed with refinement border-radius values.
  • A $enable-container-classes option is featured. When you opt for the experimental CSS grid layout, .container-* classes will always be compiled unless the option is set to false.

Copyright © 2022 IDG Communications, Inc.