title: How to limit 'pre' tag width inside "flex" container?
body: <p>It seems that <code>pre</code> tag behaves differently if placed inside block layout and flex layout item:</p>
  
  <pre><code>  &lt;div&gt;
      &lt;pre style="background-color: green;"&gt;
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      &lt;/pre&gt;
    &lt;/div&gt;
    &lt;div style="display: flex;"&gt;
      &lt;pre style="background-color: blue;"&gt;
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      &lt;/pre&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>First <code>pre</code> (marked with green background) is correctly sized by parent <code>div</code>'s width (page width). But second <code>pre</code> that is placed inside <code>flex</code> container seems to have maximum width and spawns beyond page width. This happens only if <code>pre</code> have long words. Any ways I can correctly limit second <code>pre</code>'s width without hacks like explicitly specifying it or cutting out exceeding text via <code>overflow: hidden</code>? I have tried <code>white-space: pre-wrap;</code> but it doesn't make any difference :(</p>
  
  <p><a href="https://i.stack.imgur.com/3ynYO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3ynYO.png" alt="enter image description here"></a></p>