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 margin left and right is not working properly #62142

Open
pitamdey opened this issue May 30, 2024 · 2 comments
Open

Paragraph block margin left and right is not working properly #62142

pitamdey opened this issue May 30, 2024 · 2 comments
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended

Comments

@pitamdey
Copy link

Description

The Paragraph block margins left and right are not working properly
In inspect, I can see the style is not implemented and the default margin left and right are applied which is marked with important

Step-by-step reproduction instructions

  1. Add Paragraph Block
  2. Change the Margin left and Right
  3. The changes are not getting reflected

Screenshots, screen recording, code snippet

https://www.loom.com/share/5d74674695fa41f8b50fecf986e5c2ba?sid=ae39c25b-d352-4879-801f-1de35bc48410

Environment info

No response

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

@pitamdey pitamdey added the [Type] Bug An existing feature does not function as intended label May 30, 2024
@t-hamano t-hamano added the [Block] Paragraph Affects the Paragraph Block label May 30, 2024
@talldan
Copy link
Contributor

talldan commented May 31, 2024

I think this is expected currently, as the margin for the block alignments (usually auto margin) has to take precedence for the content to stay nicely aligned. (cc @andrewserong and @tellthemachines who know more than I about this)

It is unfortunate that the UI creates the expectation that it can be changed. I wonder if there's anything that can be done about that.

@andrewserong
Copy link
Contributor

Yes, I think your comment captures it nicely. There's an inherent tension between layout styles that are designed to restrict (or constrain) content in some way, and the dimensions tools. Making the UI aware enough of that context to be either disabled or show a warning for margin, could be a path forward there?

If folks are looking for a workaround, you can wrap a paragraph in a Group block, and then toggle off the Inner blocks use content width setting on the group block, and that will get the left and right margins of the child paragraph block working. Just thought I'd mention that in case it helps anyone working on content right now.

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

4 participants