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

Button block has zero height in editor when using left or right alignment #42790

Closed
sabernhardt opened this issue Jul 28, 2022 · 2 comments
Closed
Labels
[Block] Buttons Affects the Buttons Block [Type] Bug An existing feature does not function as intended

Comments

@sabernhardt
Copy link
Contributor

Description

The zero height intended for floated image blocks in "classic" themes also can apply to Button blocks and overlap content below it.

This was part of PR #30375:

// When images are floated, the block itself should collapse to zero height.
height: 0;

Thanks to @NidhiDhandhukiya74 (nidhidhandhukiya) for reporting this on Trac 56300, as well as @KAJALwp (kajalgohel) on Trac 56144.

Step-by-step reproduction instructions

  1. Activate Twenty Twenty-One or another classic theme.
  2. Open the post editor and insert a Buttons block.
  3. Add text to the Button link and assign a URL (or #).
  4. Select the Button block and choose either "Align right" or "Align left" from Align option.
  5. Add a Paragraph block below the Buttons, and type some text.
  6. Notice that the Button block overlaps the paragraph text. If it is not obvious, you may want to set a background color to the button link.
  7. Save and view the post. The overlapping probably will not occur on the front end.

Screenshots, screen recording, code snippet

button block aligned left in Twenty Twenty-One

Environment info

  • WordPress 6.0
  • Gutenberg 13.8.0-rc.1
  • Twenty Twenty-One (and all previously bundled themes)
  • Firefox 103
  • Windows 10

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

@carolinan
Copy link
Contributor

This is difficult because different themes uses different clears for alignments.

It is also difficult because if the intention is to place two different blocks horizontally you often need a row block (or a column or in case of data, a table), not an alignment. That complexity is not expected by users and the issue is valid.

@kathrynwp kathrynwp added [Type] Bug An existing feature does not function as intended [Block] Buttons Affects the Buttons Block labels Aug 4, 2022
@tellthemachines
Copy link
Contributor

I'm going to go ahead and close this because Button no longer supports left/right alignment as of #45663.

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

No branches or pull requests

4 participants