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

Gallery Block: Stop reflows from breaking custom alignment layouts. #17586

Merged

Conversation

epiqueras
Copy link
Contributor

Fixes #17584

Description

A seemingly unnecessary flex property on the gallery block's figure element when it had left, right, or center alignment set, was causing issues when the alignment was changed between the 3 modes.

Something with how the flex space allocation calculations work was causing the breakage in #17584.

This PR fixes that by removing the property.

How has this been tested?

It was verified that the issue described is no longer happening and that the gallery block's alignment works as expected both in the editor and published site.

Types of Changes

Bug Fix: Switching between different alignment modes for the gallery block no longer breaks its layout.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@epiqueras epiqueras added [Type] Bug An existing feature does not function as intended [Block] Gallery Affects the Gallery Block - used to display groups of images labels Sep 25, 2019
@epiqueras epiqueras added this to the Future milestone Sep 25, 2019
@epiqueras epiqueras self-assigned this Sep 25, 2019
Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a bunch of styles in when I changed the markup to support deprecated versions, but having checked this against the theme testing data which still has the old galleries, it doesn't seem to break anything 😄

@epiqueras epiqueras merged commit 67e65f2 into master Sep 25, 2019
@epiqueras epiqueras deleted the fix/gallery-block-caption-alignment-layout-flush-error branch September 25, 2019 23:06
@youknowriad youknowriad modified the milestones: Future, Gutenberg 6.6 Sep 30, 2019
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

Successfully merging this pull request may close these issues.

Gallery Block: Captions are breaking layout in left- or right-aligned galleries.
3 participants