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

Paragraph block automatically adds top and bottom margin #51255

Open
paaljoachim opened this issue Jun 6, 2023 · 5 comments
Open

Paragraph block automatically adds top and bottom margin #51255

paaljoachim opened this issue Jun 6, 2023 · 5 comments
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended

Comments

@paaljoachim
Copy link
Contributor

Description

I am using the Gutenberg plugin Version 15.9.1
Twenty Twenty Three.
WordPress 6.2.2

Paragraph block adds a margin in the top and bottom.

This is what I did.

  1. I added a Cover block with a full width image.
  2. Added a Paragraph block. Added a background color.
  3. Added another Cover block with a full width image.

Screenshot 2023-06-06 at 09 39 51

Frontend:
Screenshot 2023-06-06 at 09 40 39

Notice the added top and bottom margin.

Btw one should also be able to have alignment controls the same as Heading. New issue coming up if one does not already exist.

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

Environment info

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@paaljoachim paaljoachim added [Type] Bug An existing feature does not function as intended [Block] Paragraph Affects the Paragraph Block labels Jun 6, 2023
@paaljoachim
Copy link
Contributor Author

Associated issue:
Post Content block adds additional margin one can not remove through the UI
#51242

@paaljoachim
Copy link
Contributor Author

There is currently an add alignment controls to the Paragraph block issue here:
#31429

@talldan
Copy link
Contributor

talldan commented Jun 7, 2023

What's the expected behavior?

The margin could be the block spacing, but it's hard to tell.

@tellthemachines
Copy link
Contributor

That's the block spacing, which appears between all root blocks in the post editor. My comment here also applies: the spacing can be reset in global styles. The problem is that, if you set it to 0, there will be no space at all between blocks in the post content, which is probably not desirable.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Jun 8, 2023

I added a comment here: #51242 (comment)

The basic problem is that white space shines through which disrupts the layout choices of a user. The white space is something the user does not understand how to remove (as it is not seen in the UI of a block) or have initially selected to have added to their layout. So we need to figure out a solution that works technically as well as for a user created layout which adds background color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants