Pattern previews do not include alignment class on parent block #68862
Labels
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Type] Bug
An existing feature does not function as intended
Description
I have many patterns where a Group, Columns, or Media & Text block is the "top level" block in the pattern and has alignwide or alignfull classes applied.
However, I have realized that these classes are not included in the pattern preview markup, often breaking styles.
For instance, I'm working on a site where the Group block has a border-radius by default but removes it from full width Group blocks with the selector
.wp-block-group.alignfull
. This works great, but the preview shows the containing Group block with the border radius applied because thealignfull
is not applied.I'm sure there is a reason for doing this, but it's definitely causing problems for me and I don't see any current potential workarounds for now.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Preview of current use-case where the missing
alignfull
class results in rounded corners on a full-width group block in a pattern:Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: