Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Multiple themes: Image blocks are centered by default, not left aligned #5097

Open
mikeicode opened this issue Nov 19, 2021 · 8 comments · May be fixed by #6075
Open

Multiple themes: Image blocks are centered by default, not left aligned #5097

mikeicode opened this issue Nov 19, 2021 · 8 comments · May be fixed by #6075
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report". [Pri] High Triaged [Type] Bug Something isn't working

Comments

@mikeicode
Copy link

Quick summary

I would assume that Image blocks are supposed to be left aligned (not floated left however) when you don't set specific alignment. Testing multiple Varia and Blockbase themes they are centered by default. There is no way to set them to regular left alignment without the "Align Left" setting, which results in text wrapping.

Steps to reproduce

  • Activate Maywood
  • Add an Image block, don't set a specific alignment

What you expected to happen

Published page should look like the editor with the image to the left without text wrapping.

Screen Shot 2021-11-19 at 08 11 37

The caption probably shouldn't be centered but that's not the point of this issue.

What actually happened

It's center aligned.

Screen Shot on 2021-11-19 at 08:12:43

The issue with setting it to Align Left is that the text wraps:

Screen Shot on 2021-11-19 at 08:13:38

On Maywood this CSS causes the issue:

Screen Shot on 2021-11-19 at 08:16:02

Context

Building a DIFM-L site.

pdh1Xd-78-p2

Operating System

macOS

Browser

Mozilla Firefox

Simple, Atomic or both?

Simple, Atomic

Theme-specific issue?

Every Varia and Blockbase theme I tested. Maywood is the example above.

Other notes

No response

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, easy to implement

Workaround details

You could set the image to Align Left and add a Spacer block right under the image to break the float (so the text doesn't wrap the image).

@kosiew
Copy link

kosiew commented Nov 25, 2021

Hi @mikeicode ,

Thanks for reporting this and the detailed steps.

I could reproduce this on a Simple site.

Transferring to themes repo for developers' further investigation.

@kosiew kosiew transferred this issue from Automattic/wp-calypso Nov 25, 2021
@kosiew kosiew added [Type] Bug Something isn't working User Report labels Nov 25, 2021
@jordesign jordesign added this to the Bug Herding: 2021 Week 48 milestone Dec 3, 2021
@jordesign
Copy link
Contributor

Confirmed this - setting as high priority for an answer on if this expected behavior or not?

@MaggieCabrera
Copy link
Contributor

This is what Gutenberg does on a theme with no CSS whatsoever:

Screenshot 2021-12-03 at 09 56 23

There are related issues in GB:
WordPress/gutenberg#31011

and a possible solution:
WordPress/gutenberg#35787

I think GB is also assuming the image should be centered. It appears we certainly thought so when we added the CSS to fix in the theme what wasn't working correctly in the editor.

I'd say keep this one open until the GB issue gets merged and then we can check a solution if our theme's CSS conflicts with the GB fix to make the left aligned images work correctly.

I suspect the text wrapping on left align is what's intended to happen, I think if the user doesn't want that the can use a spacer block between the image and the text.

@jordesign
Copy link
Contributor

Thanks @MaggieCabrera I'll note this as waiting a fix from WordPress/gutenberg#31011

Flagged for Bug Herders to keep an eye on

@Greatdane
Copy link

This should have now been fixed in core; WordPress/gutenberg#17162 (comment)

However, I can still reproduce on WordPress.com (Maywood).

Any thoughts @MaggieCabrera ?

@MaggieCabrera
Copy link
Contributor

This should have now been fixed in core; WordPress/gutenberg#17162 (comment)

However, I can still reproduce on WordPress.com (Maywood).

Any thoughts @MaggieCabrera ?

It may very well be that Maywood has extra CSS added, so a fix for that specific theme would be needed

bobmatyas added a commit that referenced this issue Jun 7, 2022
@bobmatyas bobmatyas linked a pull request Jun 7, 2022 that will close this issue
bobmatyas added a commit that referenced this issue Jun 10, 2022
@edwinho89
Copy link

  • 5692804-zd-woothemes

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

Support References

This comment is automatically generated. Please do not edit it.

  • 5692804-zen

@jeherve jeherve added Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report". and removed User Report labels Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report". [Pri] High Triaged [Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants