Install

Works with Drupal: ^9 || ^10 || ^11

Using 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:

  1. All JS has been rewritten on vanilla JS according to Drupal JS API, no JQuery dependency anymore.
  2. JQuery slideUp(), slideDown(), and slideToggle() functions are replaced by custom implementation on vanilla JS.

    Attach material-base/slide library to use it in your custom theme JS. Example of usage:

    Before:
    $(element).slideDown(fast);

    After:

    slideDown(element, 200);
  3. jquery.ripple.js library replaced by custom implementation on vanilla JS.
    Previously used classes have been replaced: .rippleAnimate became .ripple-effect, .rippleWrap became .ripple-wrapper.

    Attach material-base/ripple library to use it in your custom theme JS. Example of usage:

    Before:
    $(element).ripple();

    After:

    new Ripple(element);
  4. 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.
  5. Updated Gulp and dependencies to recent versions. gulpfile.js updated to use the "import" instead of the "require" function.
  6. CSS assets in libraries now have updated levels according to best practices which may cause different order of properties in cascade.
  7. Class btn-accent is 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;
        }   
      }
  8. Material Base 1.13 is compatible with Drupal 11.
  9. Improved support of boxed textarea element, now it supports also fields with CodeMirror editor widget.
  10. Added template to use button element instead of input for the form submit button. It is not enabled by default, to enable see templates/form/input--submit--button.html.twig.
Created by: iamdroid
Created on: 9 Apr 2024 at 19:22 UTC
Last updated: 2 May 2024 at 19:21 UTC

Other releases