Docs (from mjml.io, and the README.md from mjml-text package) says that allowed attributes for align are "left, right, center, justify". The arguments listed in attributes checking enum from packages/mjml-text/src/index.jsare only left, right and center. So when using align="justify" the compiler raises an error/warning.
Using 4.1.0 nodejs mjml2html with no option :
[
{
"line": 55,
"message": "Attribute align has invalid value: justify for type Enum, only accepts left, right, center",
"tagName": "mj-text",
"formattedMessage": "Line 55 of /api (mj-text) — Attribute align has invalid value: justify for type Enum, only accepts left, right, center"
},
I couldn't find a word on align="justify" being deprecated, so the error should be in enum : https://github.com/mjmlio/mjml/blob/f7051e5054aa88da489a5fa5f16a81176c56b435/packages/mjml-text/src/index.js#L9
Hi @jmbarbier
Yep, you're right, align on this one doesn't use old html attribute align but text-align so we should update the enum for this one
I'm seeing a similar error on mj-table's table-layout after upgrading from 4.0.3 to 4.1.1.
Attribute table-layout has invalid value: fixed for type Enum, only accepts auto/fixed/initial/inherit
I'm using it like:
<mj-table table-layout="fixed">
🤔 @kmcb777 can you take a look ?
hi @pawl-bb thanks for reporting this, it will be fixed in the next version
Hi @pawl-bb this has been fixed in the new release mjml4.2-beta, which you can install with npm install mjml, you can check if it solves the problem
Hi @kmcb777 - I'm using version "^4.2.0-beta.3" and I still get the same error - "Attribute align has invalid value: justify for type Enum, only accepts left, right, center"