-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern inserter: fix Broken preview layout #56814
Conversation
Size Change: +2 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
Flaky tests detected in 5c983f4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7111646610
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, @jasmussen! |
Fixes #56812
Related to #56011
What?
This PR fixes an issue where the pattern layout is broken in the main inserter and quick inserter.
Why?
In #56011, the following styles have been added to center the block in the block preview vertically.
However, this selector also affects the pattern preview in the pattern list.
The pattern preview consists of the following hierarchy.
If the preview element (
.block-editor-block-preview__container
) has a height of 100%, the element will extend to the full height of the parent element, and the pattern name (.block-editor-patterns__pattern-details
) that exists in parallel will jump out from the parent element.How?
Applies
height:100%
style to the block preview and the block style preview only (.block-editor-inserter__preview-container .block-editor-block-preview__container
).Testing Instructions
Screenshots or screencast
2a80be2ff3ae756c4e2097778d92955f.mp4