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

Handle column middle alignment #235

Merged
merged 1 commit into from
Jun 24, 2020
Merged

Conversation

adekbadek
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

As discussed in #231, column middle alignment is a tricky issue because Gutenberg uses flexbox, and MJML uses vertical-align CSS property. Recreating flexbox somehow is a bigger undertaking, so as a compromise the possibility of an all-column-middle-aligned layout is introduced in this PR. Before, middle alignment of columns was not possible in any configuration.

Closes #231

How to test the changes in this Pull Request:

  1. Create a newsletter, insert a columns block with some columns
  2. Set the columns block to middle vertical alignment (the content should be of different heights for the effect to be visible) – send a test email and observe the content is indeed middle-aligned, as in the editor.
  3. Change one of the columns to a non-middle alignment – observe a warning being shown.
  4. Fix the error by either setting the columns to middle alignment one by one, or by setting middle alignment on the columns block

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@adekbadek adekbadek merged commit 5f82db4 into master Jun 24, 2020
@adekbadek adekbadek deleted the fix/col-vertical-alignment branch June 24, 2020 12:57
@adekbadek adekbadek mentioned this pull request Jun 25, 2020
6 tasks
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support vertical center alignment on (mj-)column
3 participants