FelixSchwarz / mjml-python

Python implementation for MJML - a framework that makes responsive-email easy
MIT License
78 stars 16 forks source link

css-class does not work with mj-section #35

Closed caseyjhol closed 1 year ago

caseyjhol commented 1 year ago

The logic here is backwards from what it is in upstream:

    wrapper_class = self.get_attr('css-class') if self.isFullWidth() else None

https://github.com/FelixSchwarz/mjml-stub/blob/main/mjml/elements/mj_section.py#L202

   <div ${this.htmlAttributes({
    class: this.isFullWidth() ? null : this.getAttribute('css-class'),
    style: 'div',
  })}>

https://github.com/mjmlio/mjml/blob/988819de3375867c09585d28f555166b97415200/packages/mjml-section/src/index.js#L414

I'll work on a PR and regression test.