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

Dara: Images centered in Gutenberg display are aligned to the left #376

Closed
jamiepalatnik opened this issue Nov 21, 2018 · 6 comments
Closed
Labels
Support [Type] Bug Something isn't working
Milestone

Comments

@jamiepalatnik
Copy link

Steps to replicate

  1. Center an image with a caption in Gutenberg.
  2. Preview or publish the page.

Result

When you preview the page, the image appears aligned to the left with a very narrow caption: https://cld.wthms.co/UiQqTv

Expected

The image should display aligned to center as it appears in the editor.

  • User report: #7303077-hc
  • Follow-up ticket: #1583213-zen
@laurelfulford
Copy link
Contributor

Thanks for reporting this, @jamiepalatnik!

I can't quite reproduce this issue exactly as described - were you able to? This is what I've done:

  1. Create an image block
  2. Use a smaller image (which is what appears to be happening in the screenshot).
  3. Add a caption.
  4. Centre the block.

Both in the preview and in the published page, the image is left aligned (which needs to be fixed) but the caption is full-width:

image

Just let. me know if I'm missing a step to get the narrow caption - thanks!

@laurelfulford
Copy link
Contributor

I've deployed a fix that addresses the image not being centred in #377, and r51549-wpcom-themes. Once I can reproduce the caption issue, I can take care of that too!

@jamiepalatnik
Copy link
Author

I'm still seeing the caption issue when I test. I tried:

  1. Create an image block.
  2. Use a smaller image.
  3. Add a caption.
  4. Center the block.

I also tried changing the order:

  1. Create an image block.
  2. Use a smaller image.
  3. Center the block.
  4. Add a caption.

In both tries the caption still shows aligned to the left in a narrow column: https://cld.wthms.co/hBO7MT
Test site: https://wpjcp20170718.wordpress.com/center-caption/

@laurelfulford
Copy link
Contributor

Thanks @jamiepalatnik! It was my bad -- it's not happening in Firefox, but once I switch to Chrome, I get it! :) Looking at a fix now!

@laurelfulford
Copy link
Contributor

This should now be fully fixed, and committed in r51550-wpcom-themes! Thanks again for the extra deets, @jamiepalatnik!

@jamiepalatnik
Copy link
Author

Awesome, seems to be working for me too. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support [Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants