container {
    width: 100px;
    height: 100%;
    background-color: grey;
  }

  button {
    position: fixed;
    left: 20px;
    top: 20px;
  }

  .fixed {
    position: fixed;
    top: 25vh;
  }
</style>

<div>You should see a green box below. No blue should be visible.</div>
<div class="position-parent">
  <div class="container">
    <div class="spacer"></div>
    <div class="sticky"></div>
  </div>
</div>
<div class="long"></div>
<button id="button">Toggle Fixed</button>
<script>
  function toggleFix