#3057·mjml

CSS Shorthands in elements do not overrule definitions in <mj-attributes> if they are defined specifically (not as shorthand)

Author: ppdcCreated Mar 4, 2026Updated Mar 9, 2026

Describe the bug When defining an element's css properties in the section, there is a difference in the results, depending on whether the definitions are written as css shorthands or the attributes are defined explicitly.

To Reproduce Steps to reproduce the behavior: Compare these two tests: 1 Define section padding via css shorthand: https://mjml.io/try-it-live/5fM2CUrhn 2 Define section padding in four separate attributes: https://mjml.io/try-it-live/jUMYP1j5E

Expected behavior Both examples should behave the same way. The section's definitions should overrule the one in <mj-attributes>

MJML environment (please complete the following information):

  • OS: n/a
  • MJML Version 4.xx