Skip to content

Commit ac326b7

Browse files
committed
bugfix(mj-body): backgroud-color attributes
1 parent ab15801 commit ac326b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/mjml-body/src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ export default class MjBody extends BodyComponent {
2727
'word-spacing': 'normal',
2828
'background-color': this.getAttribute('background-color'),
2929
},
30+
div: {
31+
'word-spacing': 'normal',
32+
'background-color': this.getAttribute('background-color'),
33+
},
3034
}
3135
}
3236

@@ -39,7 +43,7 @@ export default class MjBody extends BodyComponent {
3943
<body ${this.htmlAttributes({
4044
id: this.getAttribute('id'),
4145
class: this.getAttribute('css-class'),
42-
"background-color": this.getAttribute('background-color'),
46+
"bgcolor": this.getAttribute('background-color'),
4347
style: 'body',
4448
})}>
4549
${buildPreview(preview)}
@@ -50,6 +54,8 @@ export default class MjBody extends BodyComponent {
5054
role: 'article',
5155
lang,
5256
dir,
57+
"bgcolor": this.getAttribute('background-color'),
58+
style: 'div',
5359
})}
5460
>
5561
${this.renderChildren()}

0 commit comments

Comments
 (0)