Install
Works with Drupal: ^9 || ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
688.74 KB
MD5: 246157a223905f7b35afa36d2c396497
SHA-1: a6181bf35d165a7fecc44f2917674747ea495574
SHA-256: 2a546e2acb45e17e1049feef1f7243e373c69047899798cd7e1fe3b50f958848
Download zip
734.78 KB
MD5: 8f85a9959a541e8ae8ad5bd6ed4a54e6
SHA-1: 0cd66cf230454430bd00b286a11e6810d83d32b2
SHA-256: bc39d82a5cdd757593e6726a307a82bf51aa1a9b00856a67b15c8d8124e8b52b
Release notes
Attention! There are breaking changes, test before using in production!
Change list:
- All JS has been rewritten on vanilla JS according to Drupal JS API, no JQuery dependency anymore.
- JQuery
slideUp(),slideDown(), andslideToggle()functions are replaced by custom implementation on vanilla JS.
Attachmaterial-base/slidelibrary to use it in your custom theme JS. Example of usage:
Before:
$(element).slideDown(fast);After:
slideDown(element, 200); - jquery.ripple.js library replaced by custom implementation on vanilla JS.
Previously used classes have been replaced:.rippleAnimatebecame.ripple-effect,.rippleWrapbecame.ripple-wrapper.
Attachmaterial-base/ripplelibrary to use it in your custom theme JS. Example of usage:
Before:
$(element).ripple();After:
new Ripple(element); - jquery.mobile-events.min.js has been removed. It was used only for handling swipe left action to close the mobile drawer, now it is handled by custom implementation on vanilla JS.
- Updated Gulp and dependencies to recent versions.
gulpfile.jsupdated to use the "import" instead of the "require" function. - CSS assets in libraries now have updated levels according to best practices which may cause different order of properties in cascade.
- Class
btn-accentis now added to the default submit button in all forms.
If this is unwanted behavior, you can unset it for specific forms this way:
function THEMENAME_form_alter(&$form, &$form_state, $form_id) { switch ($form_id) { case 'FORM_ID': $classes = &$form['actions']['submit']['#attributes']['class']; $classes = array_filter($classes , function($e) { return $e != 'btn-accent'; }); break; } } - Material Base 1.13 is compatible with Drupal 11.
- Improved support of boxed textarea element, now it supports also fields with CodeMirror editor widget.
- Added template to use
buttonelement instead ofinputfor the form submit button. It is not enabled by default, to enable seetemplates/form/input--submit--button.html.twig.