Repository navigation
Post Comments: Fix Older/Newer comments links styling - #40948
Conversation
|
Size Change: +1.43 kB (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
Oh jeez I didn't even spot that. Yes, we should probably keep that the same if possible. |
@jameskoster Can you help me with that? 😅 I was looking into it but found it a bit hard to figure out. AFAICS, the original vertical space was because of some browser default for I guess I could just force a top margin, but I was wondering how (pre-FSE and pre-GB) Core managed to get the space right with the clear-fix 🤔 |
|
Thanks @jameskoster! Looking great now 😄 |
Co-authored-by: James Koster <james@jameskoster.co.uk>
|
I just cherry-picked this PR to the wp/6.0 to get it included in the next release: f361ac9 |



What?
Fixes #40827. Alternative approach to #40846; based on suggestions from comments on that PR.
Why?
See #40827. tl;dr:
Users that still have the now-deprecated Post Comments block in one of their templates will find that the "Older Comments" and "Newer Comments" links aren't left- and right-aligned like they should be, but stacked on top of each other.
How?
Add
.alignleftand.alignrightstyling to the Post Comments block'sstyle.css.Furthermore, add
clear: bothto the embedded comments form, in order to make sure that the "Leave a Reply" heading isn't accidentally indented.Testing Instructions
gutenberg/packages/block-library/src/post-comments/block.json
Line 37 in 54fd3bf
Screenshots or screencast
Notes
I guess it's called Cascading Style Sheets for a reason 😬
The
float: leftandfloat: rightstyling originally caused the "Leave a Reply" comments form heading to get wrongly indented. To fix this, I addedclear: bothto the comments form. As a consequence, the spacing between the "Older"/"Newer Comments" links and that heading now seems too small 🙈Ideally, we'd probably recreate the styling for Core's
theme-compat/comments.phpfallback; I wasn't able to figure out how the clear-fix is achieved there.Anyway, this could use some eyes from a designer 😅