Releases: mjmlio/mjml
4.1.0-beta.1
Features
- Change attributes parsing to allow special characters, notably
<>, inside values (#1020, #1145, #1092) - .mjmlconfig is back, allowing to use custom components with the client (#660)
- new attribute
fluid-on-mobileon mj-image, that allows to set a width, but keep full-width on mobile (#263) - add type checking of attribute values in the validation process
- --validate option was added on client (#1142)
- allow empty alt attribute on mj-image (#1148)
- add more logging to the client to help identify error causes (#1065)
- allow global
langattribute to be specified in template for accessibility (#757) - Allow css-class to add multiple class names via multiple mj-class (#722)
Fixes
- Minify no longer break MS Outlook conditional tags (#1201)
- Repeated mj-tag's inside mj-attributes are now properly cumulated (#1194)
- text-align on mj-button is now handled (#1188)
- --watch option is fixed (#1171)
- a mj-tag which is used several times inside mj-attributes will get all cumulated attributes (#1194)
- mj-carousel image now properly fits its container (#1170)
- mj-raw no longer counts as a column in mj-section when calculating columns' width (#1152)
0value is no longer ignored in html attributes- The migration process no longer replaces mj-includes with the actual content (#1141)
- Allowed Attributes in mj-spacer added to match documentation (#1102)
- fix travis, added some tests & much linting
Documentation
- Removed remaining references to mj-container (#1079)
v4.0.5
Fixes
- Fix issue with
mj-social-elementwhen no name is specified (#1169 ) - Fix issue with
mj-socialwhen using inline styles, thanks to @Br1mbelle (#1160) - Fix
mj-imageadding the unit insideheightattribute onimg - Fix issue with file paths without extensions considered as directories (#1158)
4.0.4 Not Found Edition
Features
- New
heightattribute onmj-social&mj-social-element(#1018) widthnow supports pixels onmj-divider(#1084)- New
--verboseoption in MJML CLI for verbose logging and debugging
Fixes
- MJML-generated emails are now responsive in GMX & WEB.DE email clients too (#919), thanks to @vielhuber for the fix
- Fix
mj-fontnot importing a font when it was used inmj-style inline="inline"only (#703) - Fix attributes on
mj-tablenot being passed correctly (#1086, #1135) - Fix
mj-social-elementlost defaulthref([[SHORT_PERMALINK]]) - Fix
bodywhich was not receiving styles inlined withmj-style inline="inline"again - Fix the migration process for
mj-linkintomj-navbar-link(#1124) - Fix the override of a
mj-social-elementdefaultbackground-colorfor predefined networks (#1103) - Fix bug on Outlook Android not respecting the color of the link in
mj-button(#672)
v4.0.3
v4.0.2
Fixes
mj-socialinner-paddingis now inherited by mj-social-elements #1024mj-allno longer overrides default value inmj-attributes#1042- Compiling multiples files with an output directory should now output each file separately in the directory #1014
srcsetonmj-imagenow works as expectedaltattribute onmj-imagenow works as expected thanks to @garmeehmj-groupattributes are now working properly #1022- Having an
mj-bodyinsidemj-headdoesn't break the rendering anymore #1027 - Vertical-align is now working with Outlook #1017
mj-social-element&mj-buttonnow support thetargetattribute
+ A lot of fixes in the doc with ❤️from the community
4.0.0
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
owaattribute on themjmltag todesktop:<mjml owa="desktop">(set tomobileby default) mj-columnnow supports thepaddingattribute (which enables to create gutters too) (documentation)- You can now customize the default breakpoint (documentation)
- Validation now supports
mj-includeand validates through included files (#651) - New options for the CLI and in NodeJS (documentation)
mjml-corecan now receive askeletonfunction to redefine the default skeleton (default HTML generated by a MJML boilerplate)mjml-cli --watchnow supports multiple files (we need heavy testing here with nested includes)renderChildrencan now render JSON children as XML forrenderMJMLfunction withrawXMLoption (#914)- Creating custom components now support
this.renderMJMLto render MJML inside a component (just use the regular MJML syntax inside your custom component) this.htmlAttributesin a custom component now detects if you pass astylekey or an object
Fixes
mj-rawdoesn't alter thexml/htmlcontent 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-columnnow properly convert%intopxfor Outlook commentsmjml -Vshould 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-containeris deprecated, its attributes should now be applied tomj-bodydirectlymj-socialhas a new syntax (documentation)mj-herohas a new syntax andmj-hero-contentis deprecated. Content should be added insidemj-herodirectly (documentation)mj-navbarhas a new syntax (documentation)mjml-clihas been totally redone from scratch
4.0.0-beta.2
Feature
renderChildrencan now render JSON children as XML forrenderMJMLfunction withrawXMLoption (#914)rawelement should now works as expected, they're no more wrapped intr/tdinsidemj-column(#935)- Validation now supports
mj-includeand validates through included files (#651) - Documented available options for the CLI and in NodeJS in the readme (#845)
Fixes
- Fix includes issues introduced in beta.1 (#970, #986)
- Fix encoding in MJML attributes (#664 )
- Fix validation issues (#963)
- Fix empty default
background-colorattribute inbody(#964) - Fix the missing ability to add
css-classonmj-link(#892) - Missing viewport meta has been added back (#967)
- Fix
mj-socialattributes for custom networks (#982)
4.0.0-beta.1
The first beta for MJML v4 is here. This version is stable enough so you can start using it.
Install with npm install mjml@next.
You don't need to manually update your templates, they are compatible with MJML v4 out of the box (including this beta). To render your templates, you can:
mjml <yourfile>.mjml -o, the engine will detect if it's using the v3 syntax, migrate it to the v4 syntax, and render it to HTML with the v4 engine. If it's already written in the v4 syntax, it will simply render it to HTMLmjml -m <original-file>.mjml -o <migrated-file>.mjml. This will simply migrate<original-file>.mjmlwritten with the v3 syntax to<migrated-file>.mjmlwritten in the v4 syntax, so you can start using the v4 syntax easily.
To learn about the changelog, breaking changes and new features, read this article (no breaking change since the last alpha).
4.0.0-alpha.5
Breaking changes
mj-socialnow has a new syntax (see here)mj-hero-contentno longer exists (mj-heronow behaves like amj-sectionwith a singlemj-column)- the
customComponentAPI is a release candidate. Please submit feedback here: #880
Features
mjml-corecan now receive askeletonfunction to redefine the default skeleton (default HTML generated by a MJML boilerplate)mjml-clihas been totally redone from scratchmjml-cli --watchnow supports multiple files (we need heavy testing here with nested includes)mj-herois now supported in MJML 4- Creating custom components now support
this.renderMJMLto render MJML inside a component (just use the regular MJML syntax inside your custom component) this.htmlAttributesin a custom component now detects if you pass astylekey or an object- If you want to display the desktop layout on Outlook.com instead of the mobile fallback, you can automatically do this with the
owaattribute on themjmltag:<mjml owa="desktop">(set tomobileby default at the moment). It should be the only client specific attribute in MJML
Fixes
mjml -Vshould now output the right version ( cli + core )mj-columnnow properly convert%intopxfor Outlook commentsmj-groupshould now behave as in MJML 3.3.5 👍
Final notes :
The good :
- 3 components need to be ported back in MJML4 👍 then we can flag MJML4 as a
betaproduct - MJML 3.3.5 will no longer be
masterand will be a legacy branch like1.Xand2.X - New contributions from the community ! Thanks to @ogonkov & @dhcdata for opening PRs
The bad :
We're kind of late on schedule, type system took too much time and will be delayed for MJML 4.1. The type system will check the format of any mj-attribute and provide useful debug tips when the unit used is the wrong one.