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

Gutenberg Gallery block does not center in Full Width Template. #26674

Closed
PHuhn opened this issue Nov 3, 2020 · 5 comments
Closed

Gutenberg Gallery block does not center in Full Width Template. #26674

PHuhn opened this issue Nov 3, 2020 · 5 comments
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Bug An existing feature does not function as intended

Comments

@PHuhn
Copy link

PHuhn commented Nov 3, 2020

Describe the bug

Gutenberg Gallery block does not center in Full Width Template.

To reproduce

Add a new page.
In page Title enter Gallery
In the Document Settings tab in the Page Attributes select the Full Width Template
Click in the + sign and navigate to the Media group and select the Gallery block.
Select an image in the media library.
In the Gallery menu bar, click on the Change alignment icon and select Align center.
Click the Publish and Public again.
View the page
It appears flush left

Expected behavior

The image should appear in the center.

Screenshots

image

** Page Source **

<!-- wp:gallery {"ids":[21],"align":"center"} -->
<figure class="wp-block-gallery aligncenter columns-1 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="http://localhost:9137/wp-content/uploads/2020/06/cv-165px.jpg" alt="Connected Vehicle" data-id="21" data-full-url="http://localhost:9137/wp-content/uploads/2020/06/cv-165px.jpg" data-link="http://localhost:9137/cv-165px/" class="wp-image-21"/></figure></li></ul></figure>
<!-- /wp:gallery -->

Editor version (please complete the following information):

  • WordPress version: 5.5.3
  • No Gutenberg pluggin

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser Chrome

Additional context

This is from:
Gallery with Full view template
hmanley (@hmanley)
When I use gallery with the Standard template the Gallery is fine on the center. If I change to Full view template the Gallery goes to the left side of the page.

@talldan talldan added [Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Bug An existing feature does not function as intended labels Nov 4, 2020
@talldan
Copy link
Contributor

talldan commented Nov 4, 2020

I could reproduce, seems easiest to repro when only one image is used in the gallery, and that image is a smaller size.

@carolinan
Copy link
Contributor

Since you are mentioning In the Document Settings tab in the Page Attributes select the Full Width Template
Is this only an issue with Twenty Twenty?
Were you able to reproduce this with other themes?

@PHuhn
Copy link
Author

PHuhn commented Nov 4, 2020

I did not try any other theme.

@PHuhn
Copy link
Author

PHuhn commented Nov 4, 2020

The 2019 theme does not have a full width template. In the default template for 2019 theme, it does not center the image or images.

@glendaviesnz
Copy link
Contributor

I couldn't replicate this in TwentyTwenty theme with the new version of the Gallery block (WP 6.0, GB 13.6). With single images in the Gallery for me the image expands to fill the available width now, so is naturally centered.

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

No branches or pull requests

4 participants