#58396 closed defect (bug) (fixed)
Twenty Twenty: Inconsistent left margin in Latest Posts & Latest Comments blocks.
Reported by: | nkeller15 | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch has-screenshots |
Focuses: | css | Cc: |
Description
Hi all,
In the Twenty Twenty theme Latest Posts & Latest Comments blocks, it seems the margin-left: auto property is being overwritten to margin-left: 0 causing an inconsistency in the alignment of core blocks. Additionally, Latest Posts has this issue in the editor only and is aligned properly on the front-end.
Video Demonstration: https://www.loom.com/share/049e6cbe6f714c31b8f49795304d245c
Steps to reproduce:
- Install and activate the Twenty Twenty theme
- Ensure posts/comments exist in your site
- Add the Latest Posts and Latest Comments blocks to a page
- Add any other core block(s) to compare alignment
- Inspect parent div of aforementioned blocks and see margin-left property being set
- Save the page and view the front-end, notice how Latest Posts is aligned properly here, and Comments still are not
Attachments (9)
Change History (26)
@
17 months ago
I've fixed the CSS issue by replacing margin-left: 0 with margin-left: auto and margin-right: auto for both admin dashboard and frontend.
#3
@
16 months ago
- Version 6.2 deleted
The margins for both of these blocks broke between WordPress 5.3 and 6.0, and not at the same time.
Patch updates:
- Setting the left margin (to zero) was necessary in the original theme styles, though not anymore. I used
auto
instead of removing it in an attempt to support more versions of the theme. - The spacing matches for both the LTR and RTL versions.
- The Latest Posts block uses
.editor-styles-wrapper ul.wp-block-latest-posts
, instead of adding the.wp-block-latest-posts__list
class, for lower specificity in the editor.
This ticket was mentioned in Slack in #core-test by boniu91. View the logs.
16 months ago
#6
@
16 months ago
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: REPLACE_WITH_PATCH_URL
Environment
- OS: macOS 13.4
- Web Server: Nginx
- PHP: 8.1.9
- WordPress: 6.2.2
- Browser: Google Chrome 114.0.5735.106
- Theme: Twenty Twenty
- Active Plugins:
- Gutenberg 15.9.1
- WordPress Beta Tester 3.4.1
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
- Working on mobile
- Working when responding to another specific comment
Supplemental Artifacts
#7
@
16 months ago
- Keywords commit added; needs-testing removed
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: 58396.3.patch
Environment
- OS: macOS 13.4.1
- Web Server: Nginx
- PHP: 8.0.22
- WordPress: 6.3 alpha
- Browser: Chrome version 114.0.5735.133
Actual Results
Both blocks align correctly, in wide/full, none, left/right/center alignments.
RTL tested to the best of my ability using Arabic.
I did not test on older versions of WordPress.
#10
@
16 months ago
- Keywords commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to address error messages on r56034
This ticket was mentioned in PR #4709 on WordPress/wordpress-develop by @sabernhardt.
16 months ago
#14
Test in my fork first
Or creating a PR on the main repo could work, too :)
@sabernhardt commented on PR #4709:
16 months ago
#15
This still gets timeout errors in End-to-end and Performance tests, but the Test Default Themes & Create ZIPs actions pass.
@audrasjb commented on PR #4709:
15 months ago
#17
committed in https://core.trac.wordpress.org/changeset/56155
I've fixed the CSS issue by replacing margin-left: 0 with margin-left: auto and margin-right: auto