title: Change img via css if it is out the container
body: <p>I've got a container for image and img inside.</p>
  <p>Is there some way to change the img content if it's width becomes bigger than the container width via css? Maby image-set?</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>nav{; 
      width: 100%;
      padding: 0;
      height:70px;
      display: flex;
      position: relative;
      border-bottom: 1px solid #b8bbc0;
  }
  
  .logo-container{  
      display: inline-block;
      overflow: hidden;
      max-width: 25%;
      flex: 0 0  25%;
      -ms-flex: 0 0  25%;
      padding: 5px 0;
      margin: 5px 5px 5px 0;
      position: absolute;
      left: 5px;
  }
  .logo-helper{
      display: inline-block;
      height: 100%;
      vertical-align: middle;
  }
  .logo-container img{
      max-height:40px;
      margin: 5px;  
      display: inline-block;
      content:   url(https://wilcity.com/wp-content/uploads/2018/12/sample-logo-design-png-3.png);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;nav&gt;
      &lt;div class="logo-container"&gt;
          &lt;span class="helper"&gt;&lt;/span&gt;
          &lt;img&gt;
      &lt;/div&gt;
      &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>