title: Position sticky for sidebar whick is larger than screen size
body: <p>I have a sidebar whose height is larger than the screen size and when using <code>position: sticky</code>, I won't be able to see the bottom of the sidebar until I scroll to the end of the page.
  How can I make sure that when scrolling, for example, 50% of the page already shows the lower part of the sidebar?</p>
  <p>Here code sample: <a href="https://jsfiddle.net/zxypmqvg/3/" rel="noreferrer">https://jsfiddle.net/zxypmqvg/3/</a></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>.main-block {
    display: flex;
  }
  
  .sidebar {
    background-color: LightCoral;
    width: 25%;
  }
  
  .sidebar-content {
    margin: 5px;
    margin-bottom: 40px;
    background-color: LimeGreen;
    position: sticky;
    top: 0;
  }
  
  .main-content {
    width: 75%;
    height: 4000px;
    background-color: LightBlue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Document&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="main-block"&gt;
      &lt;div class="sidebar"&gt;
        &lt;div class="sidebar-content"&gt;
          &lt;p&gt;sometext for example for stackoverfrom&lt;/p&gt;
          &lt;p&gt;sometext for example for stackoverfrom&lt;/p&gt;
          &lt;p&gt;sometext for example for stackoverfrom&lt;/p&gt;
          &lt;p&gt;sometext for example for stackoverfrom&lt;/p&gt;
          &lt;p&gt;sometext for example for stackoverfrom&lt;/p&gt;
          &lt;p&gt;sometext for example for stackoverfrom&lt;/p&gt;
          &lt;p&gt;last string&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="main-content"&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p><a href="https://i.stack.imgur.com/jLRtX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jLRtX.png" alt="last string shows only when achieve end of page" /></a></p>
  <p>last string shows only when achieve end of page</p>