Problem/Motivation

Usually, all themes add the block plugin id to the list of the block classes, for example the Olivero theme core/themes/olivero/templates/block/block.html.twig:

  set classes = [
    'block',
    'block-' ~ configuration.provider|clean_class,
    'block-' ~ plugin_id|clean_class,
    layout ? 'layout--' ~ layout|clean_class,
  ]

Without this, the block CSS selectors from some modules stop working.

Proposed resolution

Would be great to set the same list of classes as in the core theme.

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:

Comments

murz created an issue. See original summary.

murz’s picture

Status: Active » Needs review

  • anoopsingh92 committed 4c4dfe09 on 3555381-add-classes-to-blocks
    [#3555381] feat: Block plugin id class is missing in the block HTML...

anoopsingh92 made their first commit to this issue’s fork.

  • anoopsingh92 committed 05718e6c on 1.3.x authored by murz
    [#3555381] fix: Block plugin id class is missing in the block HTML...
anoopsingh92’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

murz’s picture

Status: Fixed » Closed (fixed)

Thank you!