tor-browser

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

grid-auto-repeat-max-size-002.html (2091B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Grid Layout Test: Auto repeat tracks and percentage max sizes</title>
      4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat">
      6 <meta name="assert" content="This test checks that auto repeat tracks use percentage max size when size is indefinite to compute the number of tracks.">
      7 <link rel="stylesheet" href="/css/support/grid.css">
      8 <style>
      9 .grid {
     10  position: relative;
     11  display: grid;
     12  grid: repeat(auto-fill, 50px) / repeat(auto-fill, 100px);
     13  max-width: 50%;
     14  max-height: 80%;
     15 }
     16 .wrapper {
     17  width: 600px;
     18  height: 250px;
     19 }
     20 .item {
     21  background: lime;
     22  /* Place item on the last cell. */
     23  grid-column: -2;
     24  grid-row: -2;
     25 }
     26 </style>
     27 <script src="/resources/testharness.js"></script>
     28 <script src="/resources/testharnessreport.js"></script>
     29 <script src="/resources/check-layout-th.js"></script>
     30 <body onload="checkLayout('.grid');">
     31 
     32 <div id="log"></div>
     33 
     34 <div class="wrapper">
     35  <div class="grid" data-expected-width="300" data-expected-height="200">
     36    <div class="item" data-offset-x="200" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
     37  </div>
     38 </div>
     39 
     40 <div class="wrapper">
     41  <div class="grid" style="width: 200px; height: 100px;" data-expected-width="200" data-expected-height="100">
     42    <div class="item" data-offset-x="100" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
     43  </div>
     44 </div>
     45 
     46 <div class="wrapper">
     47  <div class="grid" style="width: min-content; height: min-content;" data-expected-width="300" data-expected-height="200">
     48    <div class="item" data-offset-x="200" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
     49  </div>
     50 </div>
     51 
     52 <div class="wrapper">
     53  <div class="grid" style="width: max-content; height: max-content;" data-expected-width="300" data-expected-height="200">
     54    <div class="item" data-offset-x="200" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
     55  </div>
     56 </div>
     57 
     58 </body>