Breakword

Long-word splitting. Text wraps at spaces, but a single word wider than its box would otherwise overflow; as a last resort it is split at character boundaries so it still fits (CSS overflow-wrap: break-word). The left card only needs space breaks; the right card has one very long word that gets chopped, so it runs to more lines and is the taller of the two. The row's align="stretch" hands that height to the shorter card as well, so the pair reads as a set rather than as two cards that happen to sit together.

Diagrams 322 × 172 <contains><row><text>

Result

Source examples/breakword.svgn

<diagram width="322" padding="16" background="#eef1f4" theme="light">
  <!-- Long-word splitting. Text wraps at spaces, but a single word wider than its
       box would otherwise overflow; as a last resort it is split at character
       boundaries so it still fits (CSS overflow-wrap: break-word). The left card
       only needs space breaks; the right card has one very long word that gets
       chopped, so it runs to more lines and is the taller of the two. The row's
       align="stretch" hands that height to the shorter card as well, so the pair
       reads as a set rather than as two cards that happen to sit together. -->
  <row gap="16" align="stretch">
    <contains width="132" label="Wraps at spaces" padding="11" fill="#ffffff" stroke="#ccd5df">
      <text width="110">a tidy little phrase that wraps at spaces</text>
    </contains>
    <contains width="132" label="Breaks a long word" padding="11" fill="#ffffff" stroke="#ccd5df">
      <text width="110">the word supercalifragilisticexpialidocious still fits</text>
    </contains>
  </row>
</diagram>

Open the SVG →