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

[Fix] Gallery losing columns when alignments are applied #9694

Merged
merged 1 commit into from
Oct 15, 2018
Merged

[Fix] Gallery losing columns when alignments are applied #9694

merged 1 commit into from
Oct 15, 2018

Conversation

nfmohit
Copy link
Member

@nfmohit nfmohit commented Sep 7, 2018

Description

This PR closes #9533 which reports that the "Gallery" block loses the assigned number of columns when alignments are applied.

How has this been tested?

This PR has been tested by going through the following steps:

  1. Started a new post using the Gutenberg editor.
  2. Added the "Gallery" block and added 3 images.
  3. Applied an alignment setting, e.g. "Center".
  4. Made sure "Gallery" block doesn't lose the assigned number of columns.

Screenshots

pull-9533-min

Types of changes

This PR applies styles which keep the display property of the gallery block as flex (which makes the column functionality work) even if alignment settings are applied (which changes the value to block and inline-block in different cases).

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

Copy link
Contributor

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

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

Confirmed that the initial issue exists, and that this PR fixes it. Nice work!

screenshot 2018-10-08 at 15 22 55

screenshot 2018-10-08 at 15 22 52

@jasmussen jasmussen added this to the 4.1 milestone Oct 8, 2018
@nfmohit
Copy link
Member Author

nfmohit commented Oct 8, 2018

Thank you so much for the review @jasmussen ❤️

@Copons
Copy link
Contributor

Copons commented Oct 15, 2018

Hi folks, are there any plans to merge this? 🙂

@jasmussen jasmussen merged commit 24c9674 into WordPress:master Oct 15, 2018
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

Successfully merging this pull request may close these issues.

Alignment: images in a centered 3-column gallery appear left-aligned in one column on the front end
3 participants