tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

sticky-subgrid-item.html (1015B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>sticky inside subgrid</title>
      4 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1958206">
      5 <link rel="help" href="https://drafts.csswg.org/css-grid-2">
      6 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
      7 <link rel="author" href="https://mozilla.com" title="Mozilla">
      8 <link rel="match" href="sticky-subgrid-item-ref.html">
      9 <style>
     10 :root { scrollbar-width: none }
     11 body { margin: 0 }
     12 .grid {
     13  display: grid;
     14  grid-template-columns: 1fr;
     15  margin-bottom: 100vh;
     16 }
     17 
     18 .subgrid {
     19  border: 10px solid orange;
     20  display: grid;
     21  grid-template-columns: subgrid;
     22  height: 400px;
     23  margin-bottom: 100px;
     24 }
     25 
     26 .sticky {
     27  background: red;
     28  position: sticky;
     29  top: 10px;
     30  height: 200px;
     31 }
     32 </style>
     33 <div class="grid">
     34  <div class="subgrid">
     35    <div class="sticky">
     36      This should not be visible.
     37    </div>
     38  </div>
     39  <div class="subgrid" id="target"></div>
     40 </div>
     41 <script>
     42  target.scrollIntoView({ block: "start" });
     43 </script>