title: Responsive layout: stretched images on Safari
body: <p>this is my layout.</p>
  
  <p>The desired behavior is that when I resize the window vertically the image scales maintaining the original aspect ratio.</p>
  
  <p>My code works very well in all browser <strong>except Safari</strong> (you can see it by trying the snippet in different browsers).</p>
  
  <p>Do you have a solution? Thanks ;)</p>
  
  <p><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>.wrap-container{
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: yellow;
    height: 55vh;
  }
  
  .wrap{
    width: 700px;
    background-color: aqua;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    padding-top: 64px;
  }
  
  .wrap img{
      height: 100%;
      width: auto;
      max-width: 300px;
      max-height: 300px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrap-container"&gt;
    &lt;div class="wrap"&gt;
      &lt;img src="https://via.placeholder.com/300"/&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>