-
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
Post Comments: Fix Older/Newer comments links styling #40948
Conversation
Size Change: +1.43 kB (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
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.
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
.alignleft
and.alignright
styling to the Post Comments block'sstyle.css
.Furthermore, add
clear: both
to 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: left
andfloat: right
styling originally caused the "Leave a Reply" comments form heading to get wrongly indented. To fix this, I addedclear: both
to 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.php
fallback; I wasn't able to figure out how the clear-fix is achieved there.Anyway, this could use some eyes from a designer 😅