-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support vertical center alignment on (mj-)column #231
Comments
Hi @janus-reith, thanks for the tip! |
@adekbadek Yes I can confirm, although this seems to be the general way So this could indeed lead to problems. Still, to really get some more sophisticated layouts done I consider the ability to center-align elements vital. I wonder if actually measuring column heights is something that could be considered, to only show a warning if really necessary? - Preferably without needing to change anything in the core column component, or outside newspack-newsletters in general. Looking at this:
It looks like the warnings work by wrapping each individual block, with access to their respective attributes. |
This is essentially an issue of translating a flexbox layout to a non-flexbox one, which gets pretty complicated. |
Great, seems to be the most simple solution! |
Thanks again for digging into that, @janus-reith ! |
# [1.3.0](v1.2.0...v1.3.0) (2020-06-30) ### Bug Fixes * apply custom styles even if styling tab in sidebar is closed ([#240](#240)) ([20b08bc](20b08bc)) * localize date formats and notice text ([0cb82f1](0cb82f1)) * posts-inserter columns warning ([5db6b97](5db6b97)) * store translated success note as prop ([5638aee](5638aee)) ### Features * add "sent" status to posts list in dashboard ([ed369e4](ed369e4)) * add a "sent" editor notice after a campaign has been sent ([188908e](188908e)) * column middle alignment handling ([5f82db4](5f82db4)), closes [#231](#231) * handle custom styling of layouts ([#238](#238)) ([2ba844d](2ba844d)), closes [#225](#225)
🎉 This issue has been resolved in version 1.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Currently, a warning is shown if the
verticalAlignment
attribute for blocks of type "core/column" is set tocenter
.mj-column does support center alignment, but calls it "middle".
In the renderer just check if
verticalAlignment
equals "center" and subsitute that with "middle" :newspack-newsletters/includes/class-newspack-newsletters-renderer.php
Line 439 in ccaebbc
Tested it, works fine.
The text was updated successfully, but these errors were encountered: