Skip to content

Pattern preview in inserter : missing classes for the outer block #71254

@benoitchantre

Description

@benoitchantre

What problem does this address?

When block patterns have a padding set with a CSS selector, the preview may not be rendered properly because of missing classes.

Example:
Image

In this example, the block should get a padding set by the following CSS in the theme

:is(.wp-block-group, .wp-block-cover).alignfull {
	padding-block: var(--wp--preset--spacing--90);
}

Here's the expected preview:
Image

To get the expected preview, the outer block should have the alignfull class.

What is your proposed solution?

The outer block should get its alignment class and custom class. Ok

Edit: custom CSS classes are added to the outer block, only the alignment class is missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions