jdrouet / mrml

Implementation of mjml in rust
MIT License
361 stars 23 forks source link

bug: border rendered twice when padding present #466

Closed dawidl022 closed 1 month ago

dawidl022 commented 2 months ago

Given this simple snippet of MJML, with a border and a padding on an mj-column:

<mjml>
  <mj-body>
    <mj-section>
      <mj-column padding-left="10px" border="3px solid black">
        <mj-text>Hello World</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

The expected outcome is as follows (view in MJML live editor):

image

However, mrml renders two borders: one outside of the column's padding, and one on the inside:

image

I believe this is a bug. When no padding is present on the column, a single border is correctly rendered.

The code used to render the MJML uses the default rendering options:

mrml::parse(mjml)?.render(&Default::default())?
jdrouet commented 1 month ago

Fixed by https://github.com/jdrouet/mrml/pull/479