Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mjml-rails seems to be incompatible with mjml 4.7.0 #65

Closed
bjliu opened this issue Sep 25, 2020 · 1 comment
Closed

mjml-rails seems to be incompatible with mjml 4.7.0 #65

bjliu opened this issue Sep 25, 2020 · 1 comment

Comments

@bjliu
Copy link

bjliu commented Sep 25, 2020

Recently, MJML released a new version, 4.7.0.

mjml-rails was working fine for us until that point, but after the update, this line began to throw some errors (in a file called _header.html.mjml ).

%mj-column{"width" => "70%"}

MJML for some reason doesn't recognize the % unit and adds px, causing failures.

Failure/Error: %mjml

ActionView::Template::Error:
  Line 43 of /tmp/in20200921-1055-tu28bu.mjml (mj-column) — Attribute width has invalid value: 70%px for type Unit, only accepts (px, %) units and 1 value(s)
------------------
--- Caused by: ---
Mjml::Parser::ParseError:
  Line 43 of /tmp/in20200921-1055-tu28bu.mjml (mj-column) — Attribute width has invalid value: 70%px for type Unit, only accepts (px, %) units and 1 value(s)

Could anyone give any direction as to why this may be an issue?

@sighmon
Copy link
Owner

sighmon commented Sep 26, 2020

@bjliu Have you tried validating your templates via the CLI to check if its a bug in this gem or with mjml itself?

mjml --validate template.mjml

@bjliu bjliu closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants