[wp-trac] [WordPress Trac] #61438: Twenty Twenty-Two: page templates do not clear floats from content
WordPress Trac
noreply at wordpress.org
Mon Jul 8 14:19:42 UTC 2024
#61438: Twenty Twenty-Two: page templates do not clear floats from content
---------------------------+------------------------------
Reporter: pitamdey | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Comment (by sabernhardt):
I uploaded patches for two options, and the CSS may be the better choice.
1. Adding Spacer blocks to page templates would achieve the clearing, but
the space could easily be too much. The patch uses 32px, which matches the
Spacer block earlier in the default Page template (and in both single
templates).
2. The CSS option would apply to the entire site, and I used zero
specificity in case there is a reason to override that for any element.
- `.entry-content + *` would clear the comments form and/or anything
else that might follow `.entry-content` within the `main` element.
- I chose to target only `footer.wp-block-template-part`, though the
header template part (and/or another template part) probably should be
fine with the clearing too.
Additional notes for reproduction/testing steps:
- When testing an Image block, a good image size would be 200 to 300
pixels wide and at least 300 pixels tall, though you could adjust the
Aspect Ratio to Classic Portrait 2:3 and define a width to help with
sizing.
- Do not add any blocks to the content area after the aligned block. Those
can display below the floated item already.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61438#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list