Mjml: mj-group background-color doesn't work anymore

Created on 6 Mar 2018  路  3Comments  路  Source: mjmlio/mjml

Hello,

It seems that mj-group background-color attribute isn't working anymore in MJML 4.

Reproduction Steps:

  1. Specify background-color on a mj-group

Expected behavior:

Colored background with MJML 4.0.0 as it was with MJML 3.3.5

Observed behavior:

Background is white after migrating to MJML 4.0.0

Screenshots and GIFs
MJML 3.3.5
MJML 3.3.5
MJML 4.0.0
MJML 4.0.0

Those tables were generated by the following code (Handlebars template)

{{#each table}}
  <mj-section>
    <mj-group width="90%" background-color="#feeeef">
      <mj-column border-left="8px solid #fd5c63" vertical-align="middle">
        <mj-text align="center" font-weight="700" padding="15px" color="#000000">
          {{name}}
        </mj-text>
      </mj-column>
      <mj-column vertical-align="middle">
        <mj-text align="center" font-weight="400" padding="15px" color="#000000">
          {{value}}
        </mj-text>
      </mj-column>
    </mj-group>
  </mj-section>
  {{#unless @last}}
  <mj-divider width="90%" border-color="#fd5c63" border-width="2px"/>
  {{/unless}}
{{/each}}

MJML version:

3.3.5 and 4.0.0

Email clients the bug is seen on:

All clients.

Bug MJML 4

Most helpful comment

Hi @fmauNeko

Nice catch, looks like component definition in 4.0.0 doesn't match 3.3.X branch, we'll fix it ASAP

All 3 comments

Hi @fmauNeko

Nice catch, looks like component definition in 4.0.0 doesn't match 3.3.X branch, we'll fix it ASAP

I have tried the above fix, can confirm it is working fine ! Thanks :+1:

Thanks for the follow up ! 鉂わ笍 We'll try to release it this week on NPM

Was this page helpful?
0 / 5 - 0 ratings