You've been waiting for it, it's here. A better, stronger, faster MJML 🎉
Features
- You can now force the desktop layout on Outlook.com instead of the mobile fallback by setting the
owa
attribute on themjml
tag todesktop
:<mjml owa="desktop">
(set tomobile
by default) mj-column
now supports thepadding
attribute (which enables to create gutters too) (documentation)- You can now customize the default breakpoint (documentation)
- Validation now supports
mj-include
and validates through included files (#651) - New options for the CLI and in NodeJS (documentation)
mjml-core
can now receive askeleton
function to redefine the default skeleton (default HTML generated by a MJML boilerplate)mjml-cli --watch
now supports multiple files (we need heavy testing here with nested includes)renderChildren
can now render JSON children as XML forrenderMJML
function withrawXML
option (#914)- Creating custom components now support
this.renderMJML
to render MJML inside a component (just use the regular MJML syntax inside your custom component) this.htmlAttributes
in a custom component now detects if you pass astyle
key or an object
Fixes
mj-raw
doesn't alter thexml
/html
content anymore (such as auto-closing tags) and is added in the HTML output where it is expected (#485 & #600)- Full-width sections are now correctly displayed in Outlook desktop (#284)
mj-column
now properly convert%
intopx
for Outlook commentsmjml -V
should now output the right version ( cli + core )- Attributes values are not wrongly encoded anymore (#664))
Breaking changes
- MJML doesn't use React anymore, meaning custom components created for a previous version of MJML don't work anymore
mj-container
is deprecated, its attributes should now be applied tomj-body
directlymj-social
has a new syntax (documentation)mj-hero
has a new syntax andmj-hero-content
is deprecated. Content should be added insidemj-hero
directly (documentation)mj-navbar
has a new syntax (documentation)mjml-cli
has been totally redone from scratch