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

Layout: Remove double output of align-items in horizontal layouts #41018

Merged
merged 1 commit into from
May 12, 2022

Conversation

andrewserong
Copy link
Contributor

@andrewserong andrewserong commented May 12, 2022

What?

Following on from vertical alignment being introduced to the layout support in #40013, this PR removes the double output of align-items for horizontal layouts.

Why?

It looks like we missed removing the existing align-items: center; output in the Layout support's server-rendering. While the "real" value takes precedence, it'd be good to tidy up the output so there's only a single property rendered. I've labelled this as a "bug", but it isn't at all a worrisome bug 😄

How?

  • Remove the default align-items: center; output for horizontal layouts, given that the condition below it will always output an align-items value.

Testing Instructions

  1. Add a Buttons block to a post
  2. Add a couple of Buttons within the block, and use Shift+Enter to make one of the buttons go to multiple lines like the screenshot below, so that you can test that vertical alignment works.
  3. Test the setting for vertical alignment, and save the post after each time and view on the front end of the site — make sure it still works (and that with no value, we still have a default value of center).

image

Screenshots or screencast

Before After
image image

@andrewserong andrewserong added [Type] Bug An existing feature does not function as intended [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels May 12, 2022
@andrewserong andrewserong self-assigned this May 12, 2022
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Nice! I saw that recently and forgot to make a patch 😄 . Thanks @andrewserong !

@ntsekouras ntsekouras merged commit 0eca03e into trunk May 12, 2022
@ntsekouras ntsekouras deleted the fix/layout-remove-double-output-of-align-items branch May 12, 2022 13:47
@github-actions github-actions bot added this to the Gutenberg 13.3 milestone May 12, 2022
@andrewserong andrewserong added the [Feature] Layout Layout block support, its UI controls, and style output. label Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Layout Layout block support, its UI controls, and style output. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants