@@ -68,6 +68,9 @@ export default class MjColumn extends BodyComponent {
6868 }
6969
7070 getStyles ( ) {
71+ const hasBorderRadius = this . hasBorderRadius ( )
72+ const hasInnerBorderRadius = this . hasInnerBorderRadius ( )
73+
7174 const tableStyle = {
7275 'background-color' : this . getAttribute ( 'background-color' ) ,
7376 border : this . getAttribute ( 'border' ) ,
@@ -77,6 +80,7 @@ export default class MjColumn extends BodyComponent {
7780 'border-right' : this . getAttribute ( 'border-right' ) ,
7881 'border-top' : this . getAttribute ( 'border-top' ) ,
7982 'vertical-align' : this . getAttribute ( 'vertical-align' ) ,
83+ ...( hasBorderRadius && { 'border-collapse' : 'separate' } ) ,
8084 }
8185
8286 return {
@@ -100,6 +104,7 @@ export default class MjColumn extends BodyComponent {
100104 'border-top' : this . getAttribute ( 'inner-border-top' ) ,
101105 }
102106 : tableStyle ) ,
107+ ...( hasInnerBorderRadius && { 'border-collapse' : 'separate' } ) ,
103108 } ,
104109 tdOutlook : {
105110 'vertical-align' : this . getAttribute ( 'vertical-align' ) ,
@@ -202,6 +207,16 @@ export default class MjColumn extends BodyComponent {
202207 return className
203208 }
204209
210+ hasBorderRadius ( ) {
211+ const borderRadius = this . getAttribute ( 'border-radius' )
212+ return borderRadius !== '' && typeof borderRadius !== 'undefined'
213+ }
214+
215+ hasInnerBorderRadius ( ) {
216+ const innerBorderRadius = this . getAttribute ( 'inner-border-radius' )
217+ return innerBorderRadius !== '' && typeof innerBorderRadius !== 'undefined'
218+ }
219+
205220 hasGutter ( ) {
206221 return [
207222 'padding' ,
@@ -213,6 +228,8 @@ export default class MjColumn extends BodyComponent {
213228 }
214229
215230 renderGutter ( ) {
231+ const hasBorderRadius = this . hasBorderRadius ( )
232+
216233 return `
217234 <table
218235 ${ this . htmlAttributes ( {
@@ -221,6 +238,9 @@ export default class MjColumn extends BodyComponent {
221238 cellspacing : '0' ,
222239 role : 'presentation' ,
223240 width : '100%' ,
241+ ...( hasBorderRadius && {
242+ style : { 'border-collapse' : 'separate' } ,
243+ } ) ,
224244 } ) }
225245 >
226246 <tbody>
0 commit comments