Skip to content

v4.6.0

Latest

Choose a tag to compare

@modius modius released this 26 Nov 09:40
37e6c79

Material now builds on Bootstrap 4.6.2, the final Bootstrap 4 release. Load Bootstrap 4.6.2's JavaScript and Popper.js 1.16.1 alongside Material. This is a maintenance release: there's no visual redesign, and Bootstrap 5 and newer Material guidelines remain out of scope.

Breaking: Sass. The Sass source uses the module system (@use/@forward) and needs Dart Sass 1.79.0+. LibSass and node-sass are no longer supported; the compiled CSS is unaffected. Configure variables with @use 'material' with (...). (#331, #336)

New

  • Toasts, styled as Material snackbars, and spinners.
  • Bootstrap 4.6 switch markup, which has no .custom-control-track span, renders as a Material switch.
  • Grid: .row-cols-* and responsive .container-{breakpoint}.
  • Utilities: .stretched-link, .text-break, .text-wrap, .text-reset, .text-decoration-none, .font-weight-lighter, .font-weight-bolder, .rounded-sm, .rounded-lg, .rounded-pill, .overflow-*, .user-select-*, .vw-100, .vh-100, .min-vw-100, .min-vh-100, and negative margins. (#340)

Fixed and changed

  • Navigation drawer:
    • Only the topmost drawer that is modal right now traps focus. Persistent, permanent and temporary drawers above their breakpoint no longer steal focus from the page.
    • Bootstrap modals opened over a drawer keep focus, and stacked drawers keep a working focus trap.
    • A prevented show.md.navdrawer no longer leaves the drawer unable to open.
      (#338)
  • util.js is ported from Bootstrap 4.6: transition delay counts toward duration, and href selectors are trimmed. Material no longer overwrites Bootstrap's $.fn.emulateTransitionEnd. (#338)
  • Bootstrap 4.6 fixes are ported to the reboot and to alerts, carousel, close, forms, navs and collapse:
    • :focus-visible outlines;
    • carousel touch swipe and cross-fade;
    • <button> nav links and carousel controls;
    • horizontal collapse;
    • configurable embed ratios.
      (#339)
  • The grid emits its classes in Bootstrap 4.6's order, so .col-{n} overrides .col on the same element. (#340)
  • Since 4.1.1 (#334):
    • a hidden navdrawer no longer gets aria-hidden, so permanent drawers stay visible to screen readers;
    • .dropdown-menu.pre-scrollable gives scrollable menus their surface and shadow;
    • the new $material-icon-font-family variable sets the icon font;
    • pickdate() passes pickadate's editable option through.
  • Check your toggle-button groups: Bootstrap 4.6's button plugin throws on load if a data-toggle="buttons" group contains a .btn without an <input>, including dropdown toggles. That also stops carousel and scrollspy auto-init. Material's own docs examples are fixed; see the migration notes.
  • The docs moved to /docs/4.6/, and old /docs/4.1/ URLs redirect, keeping their #fragment. (#341)
  • Toolchain: Node 22, Dart Sass, Rollup 4, ESLint 10, stylelint 18 and vnu-jar 26. (#316–#337)

Upgrading: bootstrap ^4.6.0 is now a peer dependency (popper.js too, but optional), so a project pinned to an older Bootstrap 4 will get an npm ERESOLVE error until it updates Bootstrap.

Thanks to djibe, whose Bootstrap 4.6 port (djibe/material) served as the reference for this release.