-
Notifications
You must be signed in to change notification settings - Fork 934
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
Confused about purpose of mjml-text #1757
Comments
It’s a standard tag for content inside a column. Mj-text also has extra attributes as container background color, padding. You can also style them with mj attributes.
…> On 18 Nov 2019, at 19:55, Callum Locke ***@***.***> wrote:
Hi. I am just learning MJML. The docs for mjml-text suggest you can nest "any HTML tag with any attributes". And it gives this example:
<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-text>
<h1>
Hey Title!
</h1>
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
The description is simply:
This tag allows you to display text in your email.
But what does it do? I can see that it lets me specify text styles, but then I could also do that on the h1 directly. In the case of font-size, I would have to add it on the h1 either way, because otherwise the browser default h1 font-size will override whatever font-size I set on the mj-text... so, why use the mj-text at all? What's it for?
It could do with a bit more explanation than "This tag allows you to display text in your email." :)
I tried the Getting Started tutorial but it doesn't shed much light.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Basically Consider this simple example: https://mjml.io/try-it-live/SJRh3wlhS Simply put, it enables to:
And all this without having to create a different |
This had me very confused as well. I didn't realize that the PS - it might be helpful to see that a bit more explicitly in the docs. 🙏 |
Hi. I am just learning MJML. The docs for
mjml-text
suggest you can nest "any HTML tag with any attributes". And it gives this example:The description is simply:
But what does it do? I can see that it lets me specify text styles, but then I could also do that on the
h1
directly. In the case offont-size
, I would have to add it on theh1
either way, because otherwise the browser defaulth1
font-size will override whatever font-size I set on themj-text
... so, why use themj-text
at all? What's it for?It could do with a bit more explanation than "This tag allows you to display text in your email." :)
I tried the Getting Started tutorial but it doesn't shed much light.
The text was updated successfully, but these errors were encountered: