Preserve resolved grid layout semantics#621
Merged
Merged
Conversation
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core/columnsconversioncore/groupFixes #620.
Root cause
ColumnsPattern::looksLikeSplitLayout()accepted generic split-layout names such ashero-innerwithout accounting for the resolved display mode.ColumnsPattern::match()then emittedcore/columnsandcore/columnwrappers. Gutenberg rendered that block as flex, replacing source grid tracks and centered alignment.In the SSI
15-saasevidence linked from #620, this expanded the hero by 118.45px and shifted every following section. With this change, the preserved fixture source compiles the hero ascore/group, notcore/columns, with zero fallbacks.Backwards compatibility
This intentionally changes serialized block shape for source elements that both resolve to
display:gridand match a Columns class/structure heuristic: they now emitcore/groupwith directly converted children instead ofcore/columnswith addedcore/columnwrappers. This preserves source CSS grid semantics and direct-child selectors. Existingwp-block-columnsmarkup remains Columns, and horizontal flex rows continue to emit Columns. Consumers that explicitly depended on inferred Columns wrappers for CSS grid source markup should review this behavior change.How to test
cd php-transformer && composer install --no-interaction.composer test.html-resolved-split-grid-stays-groupand confirm the resolved split grid emitscore/groupwithoutcore/columns.artifact-linked-css-layout-wrapper-style-signalsand confirm linked.hero-gridCSS emits a semanticsectionGroup while the flex card wrapper remains unchanged.html-horizontal-flex-stays-columnsand confirm genuine horizontal flex still emitscore/columns.AI assistance
gpt-5.6-sol