yarn mjml 4.0.0

latest releases: 5.0.0-alpha.4, 5.0.0-alpha.3, 5.0.0-alpha.2...
6 years ago

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 the mjml tag to desktop: <mjml owa="desktop"> (set to mobile by default)
  • mj-column now supports the padding 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 a skeleton 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 for renderMJML function with rawXML 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 a style key or an object

Fixes

  • mj-raw doesn't alter the xml/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 % into px for Outlook comments
  • mjml -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 to mj-body directly
  • mj-social has a new syntax (documentation)
  • mj-hero has a new syntax and mj-hero-content is deprecated. Content should be added inside mj-herodirectly (documentation)
  • mj-navbar has a new syntax (documentation)
  • mjml-cli has been totally redone from scratch

Don't miss a new mjml release

NewReleases is sending notifications on new releases.