Skip to content
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 Form: Elements in the block don't respect block gap #68955

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

dhananjaykuber
Copy link
Contributor

Fixes #53690

What?

Adds proper block gap spacing to elements within the Post Comments Form block to maintain consistent vertical rhythm with the rest of the site.

Why?

Currently, the elements in the Post Comments Form block use browser default margins, which don't align with WordPress's block spacing system. This creates an inconsistent visual rhythm where form elements don't match the spacing used throughout the rest of the site.

How?

  1. Added a container div with class wp-block-post-comments-form-elements to wrap form elements
  2. Applied var(--wp--style--block-gap) spacing through CSS to maintain consistent gaps between form elements
  3. Removed default browser margins from paragraphs within the form to prevent spacing conflicts

Testing Instructions

  1. Open a post or page where comments are enabled
  2. Add a Post Comments Form block
  3. Verify that the spacing between form elements (comment textarea, name field, email field, etc.) matches the block gap spacing used in other blocks

Screenshots or screencast

Before

Screenshot 2025-01-30 at 11 26 17 AM

After

Screenshot 2025-01-30 at 11 25 50 AM

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dhananjaykuber <[email protected]>
Co-authored-by: jordesign <[email protected]>
Co-authored-by: iamtakashi <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Post Comments Form Affects the Comments Form Block labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Comments Form Affects the Comments Form Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post Comments Form: Elements in the block don't respect block gap
2 participants