Floated blocks in post content need a clearfix solution.
The issue involves floated blocks in post content being incorrectly positioned next to elements outside the content. A clearfix solution is needed, but the scope extends beyond just post content, potentially affecting headers and footers. The requirements are somewhat clear, but implementation details and impact on other areas need careful consideration.
In block themes, when the post content contains a floated left or right aligned block, these blocks can be positioned incorrectly and end up next to a block that is outside the post content.
Here is a screenshot of the page template in Twenty Twenty-Four, where the image is the only block in the content, and is left aligned. The image is incorrectly positioned next to the footer.
If you would remove the spacer block that is below the content in the post template in the same theme, the same problem would appear.
Can some sort of clear instead be added to the post content? Right now, this problem must be solved by the theme developer/designer/user, and it would be an improvement if the block handled the clear. From doing some quick searching there does not seem to be an ideal solution for this problem.
https://stackoverflow.com/questions/211383/what-methods-of-clearfix-can-i-use
Activate Twenty Twenty-Four or Twenty Twenty-Three. Create a new page. Add an image and select the left alignment. Save and view the front of the page. Notice the position of the image.
No response
No response
Yes
Yes
Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!