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

Cover block: text over image align center center doesn't work #38869

Closed
annezazu opened this issue Feb 17, 2022 · 1 comment · Fixed by #38959
Closed

Cover block: text over image align center center doesn't work #38869

annezazu opened this issue Feb 17, 2022 · 1 comment · Fixed by #38959
Assignees
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

annezazu commented Feb 17, 2022

Description

When adding an image block and using the "Add text over image", the option to set to "center center" does not properly work. It remains to the left. This came up as part of the FSE Outreach Program's All Things Media exploration:

Using post editor, insert an image, click on ‘Add text over image’, centre centre aligns itself as centre left.

Step-by-step reproduction instructions

  1. Add image block.
  2. Select "Add text over image".
  3. Align it to "Center center".
  4. Notice nothing changes.

Screenshots, screen recording, code snippet

center.center.mov

Environment info

  • WordPress 5.9
  • Gutenberg 12.6 (with and without the plugin)
  • Chrome
  • MacOS

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

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Block] Image Affects the Image Block labels Feb 17, 2022
@annezazu annezazu added this to 📥 To do in WordPress 5.9.x via automation Feb 17, 2022
@annezazu annezazu changed the title Image block: text over image align center center doesn't work Feb 17, 2022
@annezazu annezazu added [Block] Cover Affects the Cover Block - used to display content laid over a background image and removed [Block] Image Affects the Image Block labels Feb 17, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 21, 2022
@ntsekouras
Copy link
Contributor

👋 - I can see how this can be confusing but the controls actually work as designed, based on the width of the innerblocks container of Cover block. You can see that as the center center option still keeps the block in the center vertically.

What is the reason for the confusion though is that when we insert a new Cover block, a default template is used with a paragraph that is center text aligned. That prop was missing from Image and Video conversions to Cover that I'm adding in the linked PR.

WordPress 5.9.x automation moved this from 📥 To do to ✅ Done Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
2 participants