mjml-ecm-head-attributes

4.4.0-ecm-18 • Public • Published

mjml-attributes

This tag allows you to modify default attributes on a mj-tag and add mj-class to them.

<mjml>
 <mj-head>
   <mj-attributes>
     <mj-text padding="0" />
     <mj-class name="blue" color="blue" />
     <mj-class name="big" font-size="20px" />
     <mj-all font-family="Arial" />
   </mj-attributes>
 </mj-head>
 <mj-body>
   <mj-section>
     <mj-column>
       <mj-text mj-class="blue big">
         Hello World!
       </mj-text>
     </mj-column>
   </mj-section>
 </mj-body>
</mjml>

try it live

You can use mj-all to set default attributes for every components inside your MJML document Note that the apply order of attributes is: inline attributes, then classes, then default mj-attributes and then defaultMJMLDefinition

Readme

Keywords

none

Package Sidebar

Install

npm i mjml-ecm-head-attributes

Homepage

mjml.io/

Weekly Downloads

0

Version

4.4.0-ecm-18

License

MIT

Unpacked Size

4.57 kB

Total Files

5

Last publish

Collaborators

  • tomsq