3 ms·
You can set an <mj-class> at the top of the file for a given design format to simplify your code. So in your example, if you did: <mj-class name="typebox" padd
by shortformblog 2y ago
You can set an <mj-class> at the top of the file for a given design format to simplify your code. So in your example, if you did:
<mj-class name="typebox" padding-bottom="0px" padding-top="0px" padding="10px 25px">
<mj-class name="paragraph" color="#55575d" align="left" font-family="Arial, sans-serif" font-size="13px" line-height="22px">
That would allow you to simplify your callbacks to
<mj-text mj-class="paragraph typebox">
You can also set CSS classes as well if you need something outside the MJML spec for some reason (which would potentially cover some of your cross-platform concerns).
MJML also integrates well with other languages. For example, I use a Craft CMS integration to pull data in via Twig to build complete templates directly from my CMS; there’s also an integration with Eleventy.