When building a page, we're stuck with the default block wrapping HTML and class.

      $region_name = Html::getClass("block-region-$region");
      $build[$region]['#prefix'] = '<div class="' . $region_name . '">';
      $build[$region]['#suffix'] = '</div>';

This should go inside of a block_list theme, or something. Maybe region? There's no way to change this behavior.

Issue fork panels-2820617

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mglaman created an issue. See original summary.

mglaman’s picture

andypost’s picture

basically this should be fixed by style plugins

DamienMcKenna’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev
kostyashupenko’s picture

Bump. We are trying to kick these hardcoded prefixes / suffixes on all our projects all these years. To me - i don't think it's useful somehow (at least we can make it optional with some checkbox in admin back office?). Front-end world is expecting render of one/several block's divs right inside region's div, but with such hardcode we getting extra wrapper. What's most important is that we don't have control on these extra divs, so becomes annoying

andypost’s picture

@kostyashupenko any proposal about how to fix?

kostyashupenko’s picture

Status: Active » Needs review

Proposal commited

andypost’s picture

@kostyashupenko your MR just removing wrapper instead of using block_list