title: how is a flex-basis calculated when the flex item's width is 100%?
body: <p>The initial value of flex-basis is automatically sized based on the contents of the flex items. And the content <code>img</code> element depends on the width of the parent element (<code>width: 100%</code>). In other words, an infinite loop of reference occurs between the flex item and the img element.</p>
  
  <p>In fact, however, as in the following code snippet, processing will not stop with an infinite loop. Why is this? How does the browser (spec) avoid infinite loops?
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.row {
    display: flex;
    flex-wrap: wrap;
    width: 500px;
    background: #faf;
    height: 120px;
  }
  
  .text {
    background: #ffa;
  }
  
  img {
    width: 200%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="row post"&gt;
    &lt;a href="#" class="text"&gt;
      &lt;img src="https://placeimg.com/150/50/animals"&gt;
    &lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>