-
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: Even out the top margin inside the block #35887
Conversation
Size Change: +2.53 kB (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
I think this is a great idea to simplify the spacing in this area. I've tried this out on Blockbase + Co, and as far as I can see, it doesn't make a massive difference. In Blockbase, we've hidden the So, this looks good to me from my testing 👍 |
@@ -1,4 +1,9 @@ | |||
.wp-block-post-comments { | |||
.comment-reply-title, | |||
.nocomments { |
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.
If #35743 merges, I don't think .nocomments
will ever appear. That said, I think zero'ing the margin for the reply title is an improvement.
Also I tested this PR and 2022, if I go to a post with existing comments and comments turned off, this is what appears:
I thought maybe the "Comments are closed" message would appear, but it does not.
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.
Ah, good catch. I updated the PR to just target the first h3
in there instead.
Depending on whether or not comments are open or closed, the first block within the
.comment-respond
div either has a whole lot of top margin, or very little:Gutenberg doesn't define those margins — they're left at the browser defaults. This discrepancy makes it impossible for themes to set a consistent vertical position for the post comments block, without adding custom CSS:
This PR removes the top margin from those top items, to allow these titles to even out by default:
The
wp-comments
block still has its own native block margins, so I don't think these are really necessary anyway. I don't think this should have a substantial effect on any existing block themes.