diff --git a/packages/mjml-column/src/index.js b/packages/mjml-column/src/index.js index 75ed0639b..f99768191 100644 --- a/packages/mjml-column/src/index.js +++ b/packages/mjml-column/src/index.js @@ -40,8 +40,8 @@ export default class MjColumn extends BodyComponent { const { nonRawSiblings } = this.props const { borders, paddings } = this.getBoxWidths() const innerBorders = - this.getShorthandAttrValue('inner-border', 'left') + - this.getShorthandAttrValue('inner-border', 'right') + this.getShorthandBorderValue('left', 'inner-border') + + this.getShorthandBorderValue('right', 'inner-border') const allPaddings = paddings + borders + innerBorders diff --git a/packages/mjml-core/src/createComponent.js b/packages/mjml-core/src/createComponent.js index f7630609b..1be1ef120 100644 --- a/packages/mjml-core/src/createComponent.js +++ b/packages/mjml-core/src/createComponent.js @@ -128,10 +128,10 @@ export class BodyComponent extends Component { return shorthandParser(mjAttribute, direction) } - getShorthandBorderValue(direction) { + getShorthandBorderValue(direction, attribute = 'border') { const borderDirection = - direction && this.getAttribute(`border-${direction}`) - const border = this.getAttribute('border') + direction && this.getAttribute(`${attribute}-${direction}`) + const border = this.getAttribute(attribute) return borderParser(borderDirection || border || '0') }