tor-browser

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

grid-item-rel-pos-001.html (1186B)


      1 <!DOCTYPE HTML>
      2 <meta charset="utf-8">
      3 <title>CSS Grid Layout Test: Rel.pos. grid item with style change.</title>
      4 <link rel="author" title="James0x57" href="mailto:James0x57@gmail.com">
      5 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
      6 <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-items" title="Grid Items">
      7 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1576355">
      8 <link rel="match" href="grid-item-rel-pos-001-ref.html">
      9 <meta name="assert" content="Checks that the rel.pos. grid items are positioned correctly after a 'left' style change.">
     10 <style>
     11 .grid {
     12  margin: 40px;
     13  display: grid;
     14  grid: auto / repeat(3,100px);
     15  grid-gap: 20px;
     16 }
     17 span, even {
     18  position: relative;
     19  min-height: 20px;
     20  background: grey;
     21  left: 0px;
     22 }
     23 .offset even {
     24  left: 50%;
     25 }
     26 
     27 </style>
     28 
     29 
     30 <div class="grid offset">
     31  <span></span><span></span><span></span>
     32  <even></even><even></even><even></even>
     33  <span></span><span></span><span></span>
     34 </div>
     35 
     36 <script>
     37  document.body.offsetHeight;
     38  let grid = document.querySelector('.grid');
     39  grid.classList.remove('offset')
     40  document.body.offsetHeight;
     41  grid.classList.add('offset')
     42 </script>