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 Excerpt: Unwanted default margin on paragraph #47457

Closed
iamtakashi opened this issue Jan 26, 2023 · 5 comments · Fixed by #47538
Closed

Post Excerpt: Unwanted default margin on paragraph #47457

iamtakashi opened this issue Jan 26, 2023 · 5 comments · Fixed by #47538
Assignees
Labels
[Block] Post Excerpt Affects the Post Excerpt Block

Comments

@iamtakashi
Copy link

iamtakashi commented Jan 26, 2023

Description

The paragraph inside the post excerpt block has the browser default margins, and that is causing a misalignment.

For example, you would expect the excerpt to align with the post title and the meta, but it won't. The issue is apparent on both in the editor and on the front of the site. The example below was with the Twenty Twenty-three theme, but this is not a theme-specific issue.

Screenshot 2023-01-26 at 12 21 21

It'd be great if it were removed in the plugin so that themes don't need to remove it with CSS.

BTW, the Term Description block shares the problem.

Step-by-step reproduction instructions

  1. Go to the editor
  2. Add a post excerpt block
  3. See it has top and bottom margins

Screenshots, screen recording, code snippet

No response

Environment info

WP v6.1.1
Gutenberg trunk. The issue is also happening without the plugin.

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

@beafialho
Copy link

As an additional improvement, it should be possible to have text alignment controls in the post excerpt as in other text blocks.

postexcerpt.mp4

@ndiego ndiego added the [Block] Post Excerpt Affects the Post Excerpt Block label Jan 26, 2023
@iamtakashi
Copy link
Author

@jasmussen If we can get rid of these unwanted margins, it'd be very helpful for the text-focused patterns for #44140 Is there any chance for this and #47458 to be looked at?

@jasmussen
Copy link
Contributor

This is a really good one, yes. I'll see if I can't sneak in a PR soonish. In the mean time and as prep, I wonder: is there a use case for that default margin? I know we have some other margin rules around paragraphs inside groups, is there really any downside to removing this margin? CC: @ntsekouras

@carolinan
Copy link
Contributor

carolinan commented Jan 30, 2023

I assume from the video that the second request is for text alignment on the post excerpt placeholder.
I have a pull request for that that needs to be reviewed.

For adding block alignments and wide/full, it was recommended not to add it.

@jasmussen
Copy link
Contributor

Created #47538 in an attempt to fix this. Give or take the margin discussion around "Read more", I think this is a good step forward.

@ndiego ndiego moved this to 🏗️ In Progress in WordPress 6.2 Editor Tasks Jan 30, 2023
@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to ✅ Done in WordPress 6.2 Editor Tasks Feb 1, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Excerpt Affects the Post Excerpt Block
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants