-
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
Vertical alignment of flex containers incorrect on front end #41324
Comments
Actually, this seems to work in Gutenberg 13.2.2. It doesn't in WordPress 6.0. Closing for now. |
This seems to be an issue when upgrading sites using gutenberg to WP 6.0. The "core/columns" block now falls back to verticalAlign center if it's not explicitly set, but the editor shows them as "top" aligned. Cannot override this fallback on a theme. |
I believe I have tracked down the vertical alignment issue with flex layouts. It looks like the PHP change from Here's the original PR: #40013 Current code in Gutenberg trunk: https://github.com/WordPress/gutenberg/blob/trunk/lib/block-supports/layout.php#L117-L131 Current code in WordPress 6.0 branch: https://github.com/WordPress/WordPress/blob/6.0-branch/wp-includes/block-supports/layout.php#L117-L126 @adamziel - Pinging you here as requested to find the best way forward. |
I just added this to the 6.0.1 Project Board. |
This issue has NOT been resolved with WordPress 6.0.1, the frontend still behaves as Justin described. |
|
cc @ockham who'll lead the next Core Editor merge. |
Thanks! Added to the (newly created) WP 6.1 Editor Tasks board 👍 |
Just updated to Version 6.0.2 and this is still happening. Please address this. Can we just have alignment based classnames dynamically added to the block so us devs can add style overrides? This dynamic |
Can confirm this is not fix in 6.0.2 temporary workaround until fix .. // remove layout support styles until vertical align gets updated in wp 6.1 function ussaac_remove_group_layout_support_flag($block_content,$block) { add_filter('render_block','ussaac_remove_group_layout_support_flag', 9, 2); |
Description
When adding a Row block or a Buttons block, the vertical alignment of the nested blocks is correctly applied in the editor. However, on the front end, the blocks are always aligned in the center. Issue reported here: https://wordpress.org/support/topic/6-0-rc4-layout-for-row-block-is-always-align-items-center/
In the editor, the container is given
align-items: flex-start;
. On the front end, the container is givealign-items: center;
.Issue #35849 seems to be a related ticket, but it is suggesting that we add vertical alignment controls. However, these controls are already present.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Editor view:
Front-end view:
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: