code: function (element, closeAll) {
          var expanded = typeof closeAll !== 'undefined' ? closeAll : childRulesExpanded(element);
  
          if (expanded) {
              element.textContent = 'close all';
              element.classList.remove('closed');
              element.classList.add('expanded');
          } else {
              element.textContent = 'expand all';
              element.classList.remove('expanded');
              element.classList.add('closed');
          }
      }
docs: if all rules are closed, toggle button to 'expand all'.
  if any rule is open, toggle button to 'close all'.