Separator Block: prevent block from collapsing to zero size inside row/stack layouts#80308
Separator Block: prevent block from collapsing to zero size inside row/stack layouts#80308dhruvikpatel18 wants to merge 1 commit into
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @jasperf, @Invoke-STPE. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Closes #47993
Fixes the Separator block disappearing (rendering at zero size) when placed inside a row or stack Group block variation, in both the editor and the front end.
Why?
The wp:separator block renders as an empty
<hr>with no content. row/stack group variations use display: flex, and a flex item with no content has no natural size on the main axis unless one is explicitly set. As a result:This affects the default and wide separator styles. The dotted style (is-style-dots) was unaffected because it derives its width from generated pseudo-element content rather than layout, so it never collapsed. This same root cause was also reported affecting the Query Pagination block (#44587), which uses the same flex-based group layout internally.
Testing Instructions
Screenshots or screencast
Screen.Recording.2026-07-15.at.4.08.49.PM.mov