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

Image alignment is left by default but it displays center as default #33349

Closed
TheRadicalDreamer opened this issue Jul 11, 2021 · 8 comments
Closed

Comments

@TheRadicalDreamer
Copy link

Description

If you add a new image from library, by default it will show that the alignment is centered, BUT the real alignment is left.

Step-by-step reproduction instructions

Expected behaviour

It should be left alignment as default

Actual behaviour

It shows centered alignment

Screenshots or screen recording (optional)

image

Code snippet (optional)

WordPress information

  • WordPress version: 5.7.2
  • Gutenberg version: not installed
  • Are all plugins except Gutenberg deactivated? yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? No

Device information

  • Device: Chromebook Flex 5
  • Operating system: Chrome OS
  • Browser: Chrome
@ashfame ashfame added the [Block] Image Affects the Image Block label Jul 28, 2021
@ashfame
Copy link
Member

ashfame commented Jul 28, 2021

I was able to reproduce this on Linux/Firefox with Twenty Twenty-One Version: 1.4 theme as well. Tried with both Gutenberg plugin enabled and disabled.

I added a small Image & by default it should be left aligned, as reflected in editor and as per the toolbar button state, but with the theme its center aligned. Perhaps this is a theme issue and not Gutenberg issue. I will investigate further in a bit and report back.

@ashfame
Copy link
Member

ashfame commented Jul 28, 2021

Twenty Twenty-One theme has text-align:center on .wp-block-image by default and only when you explicitly align it left/right, it gets aligned and shown accordingly. So a theme can very well have the image as center aligned as a default behavior but the same should be shown in editor view as well. I will report this issue to the theme repo.

@ashfame
Copy link
Member

ashfame commented Jul 28, 2021

Reported - https://core.trac.wordpress.org/ticket/53809 Going to close this issue here.

@TheRadicalDreamer
Copy link
Author

i believe is not related to the theme

here for example: #31011

@TheRadicalDreamer
Copy link
Author

image

@ashfame
Copy link
Member

ashfame commented Aug 8, 2021

@avagp That seems like an issue when centre alignment when chosen doesn't work as expected. This issue that you filed was about default alignment when nothing is chosen, in which case the default theme had an inconsistency as I explained. So these actually are two different things. Plus with every theme, there can be its own version of inconsistencies, so we have to mind that. If you feel different, please argue your findings.

@TheRadicalDreamer
Copy link
Author

TheRadicalDreamer commented Aug 9, 2021

independently of the theme's default option, i believe gutenberg should read that.

rather than expecting every theme to have left alignment as default to correspond with gutenberg.

I feel this is a usability issue that cannot pass unnoticed.

With little images is obvious there is a mistake, and with larger ones, you will only notice when you publish and the see the actual page.

The theme i am showing on my images are from blocksy, but i have tested with 2020,2021 and 2019, and also happens

Also, here (on 2020) is a picture of a centered image and a image just loaded:
image

Both are centered, as the GUI says.
But one is more on the left.

And in addition to that, if i chose left alignment on the latter, it goes to the really left:
image

So maybe there are 2 issues here.

@paaljoachim
Copy link
Contributor

paaljoachim commented Oct 20, 2021

Hey there is a PR that is being worked on here: #35787

An easy way to test the PR is following this method: https://make.wordpress.org/design/2021/03/03/testing-a-gutenberg-pull-request-pr/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants