Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't handle overflowing code block under mjml-text #2615

Closed
softmarshmallow opened this issue Jan 9, 2023 · 2 comments
Closed

Can't handle overflowing code block under mjml-text #2615

softmarshmallow opened this issue Jan 9, 2023 · 2 comments

Comments

@softmarshmallow
Copy link

<mjml>
  <mj-head>
    <mj-font name="Source Code Pro" href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600;700&display=swap" />
    <mj-attributes>
      <mj-text font-size="14px" align="left" color="black" font-family="Source Code Pro" />
      <mj-section background-color="#fff" />
      <mj-social-element icon-size="24px" />
    </mj-attributes>
  </mj-head>
  <mj-body background-color="#eee">
    <mj-section>
      <mj-column>
        <mj-text font-weight="bold">
          <code>
            <pre style="background-color: black; padding:12px">123456789098765432345678987654323456789876544567898765434567898765456788765456789876556789876556787654</pre>
          </code>
        </mj-text>
      <mj-column>
    </mj-section>
  </mj-body>
</mjml>

Cannot find a way to handle overflowing content in mj-text with code block styling overflow:scroll; won't do.

@iRyusa
Copy link
Member

iRyusa commented Jan 9, 2023

Not really related to MJML here it's specific to HTML CSS https://www.caniemail.com/search/?s=word-break can be used to try minimize the impact but it's not perfect

@iRyusa iRyusa closed this as completed Jan 9, 2023
@softmarshmallow
Copy link
Author

It was caused by pre changing pre to p did the trick.

word-break won't be applied to pre tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants