mjmlio / mjml

MJML: the only framework that makes responsive-email easy

Home Page:https://mjml.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mj-container

brfignoni opened this issue · comments

Is your feature request related to a problem? Please describe.
Hi. I have a bunch of mj-section's that I would like a gap between them (by gap I mean a space, that is only applied between mj-sectino´s. Not before, not after). Here is a picture to clarify:

Screen Shot 2023-12-04 at 11 17 53

Because gap plays in hand with flex, and flex is not supported, I have to rely on padding (top or bottom). But I do not want padding-bottom on the last mj-section (or padding top on the first mj-section). I think I could rely on first-child or last-child, but for this I would need a wrapper. I know there exists the mj-wrapper, but I am already using it (it represents the white box with rounded corners). I have tried using another mj-wrapper, but I can't (mjml doesn't like nested mj-wrapper's.).

Describe the solution you'd like
I would like to have a second level wrapper (mj-container?), that I can use inside a mj-wrapper. mj-group is not a good choice, because it will disable responsive queries, and I might not want that.

Describe alternatives you've considered
None, since I didn´t see a suitable mj component for this purpose (it would be the mj-wrapper, but as I mentioned, I can not nest them).

Additional context
None.

👋
You need to handle this manually with padding bottom and top, there's no way to handle an automated gap like that.

@iRyusa thanks for that quick reply, and for this great tool.