Open tpetry opened 5 years ago
Interesting, equal-height columns are always a problem because of responsiveness, but in a mj-group it may be possible to do something. Might not be an easy one though
The markup will be really easy and i will not expect any problems with client as you can use plain old HTML 1.0 tables. But i was not able yet to build a PoC because i didn't succeed in changing the markup generation of the mjml group renderer.
Any news on this? I am having the same problem as described by @tpetry with dynamically content from a database.
I have the same problem.
me too, would love to see this resolved in the next version
Already thought this would be implemented. Hopefully, it's added in a new release!
Yeah we would like to do so for mobile only, but it's a bit hard to tweak current group+column code to have this working without breaking everything else. Maybe this could be implemented in a custom comp for now and merge it into both group/column if we can.
This would be so useful!
@iRyusa @DRoet any updates?
I have the same problem. Is there any update on it? @iRyusa @DRoet
Bump this
bump
@iRyusa Are there any updates on this issue ?
@iRyusa Есть ли обновления по этому поводу?
I have been working with vue-style structured mjml assembly on gulp for a long time. And I just collect used components for myself. It's easier to write such things yourself. If someone volunteered to do the work together, then we could register some nice custom components ...
We're not currently working on this
Bump
Desired feature +1
+1
+1
desired feature please add this
Yes this is very desired feature. I need this! :)
This is a desired feature!
Update on this?
Update?
Still a desired feature, it's simple to do with a html table but it'd be nice to have it directly in MJML
Bump for a desired feature.
Any update?
+1
Add me to the list of folks struggling with this issue.
I am also running into this issue.
@iRyusa Есть ли обновления по этому поводу?
I have been working with vue-style structured mjml assembly on gulp for a long time. And I just collect used components for myself. It's easier to write such things yourself. If someone volunteered to do the work together, then we could register some nice custom components ...
I' gladly help you, im working on my own dnd html email editor with mjml
Bump for a desired feature
Bump
Bump
I bumped this back in April 2022 (over 2 years ago now). I’m bumping again as I still use MJML in our production email system AND I still have a need for auto-height columns in a group.
Any chance this feature will make it into v5?
Also, is there a roadmap where we can see what’s being worked on next or what improvements are being made?
Thanks again for making such an awesome email templating framework!
Cheers!
This is not something i'm working on, as there's no real way to support this with current implem.
You can just use a table layout if you really need this in a single column but it won't be responsive.
There's no roadmap or what's so ever because I'm currently the only one to work on this project, and my time is very limited.
On Fri, May 3, 2024 at 4:25 PM Ryan R. Smith @.***> wrote:
I bumped this back in April 2022 https://github.com/mjmlio/mjml/issues/1582#issuecomment-1111426475 (over 2 years ago now). I’m bumping again as I still use MJML in our production email system AND I still have a need for auto-height columns in a group.
Any chance this feature will make it into v5?
Also, is there a roadmap where we can see what’s being worked on next or what improvements are being made?
Thanks again for making such an awesome email templating framework!
Cheers!
— Reply to this email directly, view it on GitHub https://github.com/mjmlio/mjml/issues/1582#issuecomment-2093130566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELHTJGHPR6JPBDER7NEJ3ZAOM55AVCNFSM4HHDKA42U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBZGMYTGMBVGY3A . You are receiving this because you were mentioned.Message ID: @.***>
Problem description A common problem in email design (and web) design is to have content of the same height standing side by side. Content should be responsive in mails, but the
mj-group
tag allows you to prevent stacking if certain content should really be displayed side by side. This is a simple example of what we want to achieve:There are many variations of this requirement, but in the end it is always about making two columns (
mj-column
) the same height for different aspects of styling (background colors, background images, common alignment lines, ...).Possibilities to solve it currently Currently, the problem can only be solved by assigning the same fixed height to each column. This is feasible for one-time mailings created by a programmer/designer, but it's a very complex thing because the slightest text change requires new height values. Additionally it is not guaranteed that the height specification will work everywhere because the different operating systems render fonts slightly different and therefore different line breaks and text heights could occur.
The approach does not work at all with dynamically generated mails consisting of e.g. contents from a database.
Highlighting the current technical state The following MJML code creates the following mail with columns not of the same height:
Why automatic columns of the same height are currently not possible Currently,
mjml-column
tags are rendered in the same way whether they are in a section or group. This happens because an AST is created based on the markup and each tag renders itself and only inserts the markup of the rendered child nodes in the correct places.The resulting markup looks something like this:
In contrast to sections the columns do not stack because they are assigned a fixed width which together results in 100% width. The generated markup is absolutely useful because a column is always rendered the same way and only the parent (section or group) controls the width differently.
A common height is not possible because divs in a div (or table column) cannot be instructed to have the same height.
Possible solution to the problem The group renderer will not just render its markup and let the mjml-column renderer create the content. The Group Renderer will do the rendering of itself and its columns and will only handover rendering the contents of the columns to these child components.
Thus it is possible to create new markup for columns in a group and to render groups and columns simply as a table. It would look something like this:
Addendum This feature is not only limited to people using the mjml markup language. It's not possible to do it in mailjets visual builder too which is based on mjml: