-
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
Fix: Clear floats on specific successive blocks that use alignment tool #16780
Conversation
Improves frontend/backend consistency of floats. Themes (Including Twentynineteen) generally clear blocks with center alignment if they come straight after a block with left/right float. To recreate: 1- Add two blocks with alignment options, such as the Image block. 2- Set first block to align to left/right and set second block to align to center. 3- Second block should be 100% the width and clear the float from the first block.
…milar to TwentyNineteen approach)
// Center | ||
&[data-align="center"] { | ||
clear: both; | ||
} |
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.
I still have the same question, not sure if it was answered. This behavior only applies to the editor, do we want to apply the same behavior in the frontend too?
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.
it makes sense to have the same behavior right?
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.
It does for me 🤷♂ but maybe we're expecting the theme to define that?
This would be a PR that would be great to get as soon as possible into Gutenberg and core, as floats and alignment issues still need fixing. @obenland or others. EDIT: Obenland told me that he does not have the time to work on this PR. |
Closing this one in favor of #21608. Let me know if this was in error! |
Description
Rebased PR #13819, fixing conflicts with master.
See #13819 (comment)
Fixes #13819.
Fixes #13784.
How has this been tested?
In local environment, adding images and floating them around.
Types of changes
Adds a CSS selector to clear center-aligned images.
Checklist: