I'm new to mjml and I'm trying to find out if there is a way to make <mj-text>
elements to display inline-block
without using <mj-style>
or inline css.
I have an <mj-text>
which renders dynamically-generated text - so I have no way to foresee its width. I would like this container's background to end where the text ends and not fill the entire page's width (like block elements do).
Here is and example of the template I'm trying to render:
<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-text align="left" container-background-color="#c3e16d" color="#60b7f1" font-size="14px">
<span>Dynamically Generated Text</span>
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
After some searching I did manage to get it to work using an <mj-style>
block - but what I'm trying to figure out if there is a more proper way to do it using the mjml
api.