How to set font features (stylistics sets) in MJML

1.3k views Asked by At

I am trying to get font-feature-settings CSS integrated into an MJML template.

I tried integrating it in mj-all attributes like

<mj-all font-family="Space Grotesk, Arial" font-size="22px" color="#212B39" font-feature-settings="ss04" />

as well as putting it on different css classes within mj-style like

<mj-style>
    html {
        font-feature-settings: "pnum" on,"lnum" on,"ss04" on;
    }
</mj-style>

None of that seems to work. From what I could see there's no official support in MJML for that and setting it globally through CSS doesn't seem to work - at least for the email clients I tried.

Any help is appreciated.

1

There are 1 answers

0
Gynekolog On

Try

<mj-head>
    <mj-attributes>
      <mj-text font-size="48px" color="#483F38" font-family="Helvetica, Arial, sans-serif" />
    </mj-attributes>
  </mj-head>

live example doc