Repository navigation
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-trackspan, 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.navdrawerno longer leaves the drawer unable to open.
(#338)
util.jsis ported from Bootstrap 4.6: transition delay counts toward duration, andhrefselectors 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-visibleoutlines;- 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.colon 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-scrollablegives scrollable menus their surface and shadow;- the new
$material-icon-font-familyvariable sets the icon font; pickdate()passes pickadate'seditableoption through.
- a hidden navdrawer no longer gets
- Check your toggle-button groups: Bootstrap 4.6's button plugin throws on load if a
data-toggle="buttons"group contains a.btnwithout 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.