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

Query Pagination: Remove unwanted bottom margins from links #51299

Open
iamtakashi opened this issue Jun 7, 2023 · 4 comments
Open

Query Pagination: Remove unwanted bottom margins from links #51299

iamtakashi opened this issue Jun 7, 2023 · 4 comments
Labels
[Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Type] Enhancement A suggestion for improvement.

Comments

@iamtakashi
Copy link

Description

It's minor, but I remove it in every theme I work on. The bottom margins 0.5em on the block's links seem unnecessary, creating misalignment. Can we remove them?

Screenshot 2023-06-07 at 15 57 22

Screenshot 2023-06-07 at 15 57 34

Screenshot 2023-06-07 at 15 57 40

Step-by-step reproduction instructions

  1. Go to Editor
  2. Add a query pagination block
  3. See the bottom margin added to the elements in the block.

Screenshots, screen recording, code snippet

No response

Environment info

  • WP 6.2.2
  • Gutenberg trunk
  • Chrome, Mac

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

@aurooba aurooba added [Type] Enhancement A suggestion for improvement. [Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block labels Jun 7, 2023
@aurooba
Copy link
Member

aurooba commented Jun 7, 2023

Good note, @iamtakashi! I believe the margin is there to deal with the scenario where those different elements are get really close to one another. Perhaps instead of an arbitrary 0.5em, we could take advantage of the blockGap property instead? 🤔

@iamtakashi
Copy link
Author

@aurooba Thanks for sharing your thought.

Whatever comes after the pagination block already has the top margin equivalent to the blockGap. But because of the unwanted bottom margin, the gap is bigger than how it should be. (Notice the gap between the orange(top margin on the image block) and the link in the pagination block.)

Screenshot 2023-06-07 at 17 10 41

It feels safe to remove the bottom margin though I wonder if anyone knows the intention.

@aurooba
Copy link
Member

aurooba commented Jun 8, 2023

Ah yes, I see what you're saying. For some reason I thought that the blockGap wasn't set to apply on the inner pagination blocks, but upon looking at it again, I can see that it is. I agree with you, the bottom margin can likely be removed from the inner pagination blocks.

Since blockGap didn't always exist, it's possible that the this margin was added before and then just got missed when blockGap was introduced.

For those folks who have blockGap disabled, do you think it would be a reasonable assumption that there would be no margin at all or in those cases should this margin still exist?

@iamtakashi
Copy link
Author

Since blockGap didn't always exist, it's possible that the this margin was added before and then just got missed when blockGap was introduced.

That's what I guess too.

For those folks who have blockGap disabled, do you think it would be a reasonable assumption that there would be no margin at all or in those cases should this margin still exist?

That's a good question. Unlike a p or figure elements, it doesn't have margins from the user agent stylesheet, and it could bump to other blocks in some cases when the blockGap is disabled.

If Global Styles allows controlling the margins for the block, it'd be easier to remove it. Would that be a better solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants