tor-browser

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

grid-container.html (875B)


      1 <!doctype html>
      2 <title>CSS Container Queries Test: Grid container</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-conditional-5/#size-container">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="support/cq-testcommon.js"></script>
      7 <style>
      8  #grid {
      9    display: grid;
     10    container-type: inline-size;
     11    width: 400px;
     12    grid-template-columns: 1fr 1fr;
     13  }
     14  @container (width = 400px) {
     15    #grid div { color: green }
     16  }
     17 </style>
     18 <div id="grid">
     19  <div id="item1"></div>
     20  <div id="item2"></div>
     21 </div>
     22 <script>
     23  setup(() => assert_implements_size_container_queries());
     24 
     25  test(() => {
     26    assert_equals(getComputedStyle(item1).color, "rgb(0, 128, 0)");
     27    assert_equals(getComputedStyle(item2).color, "rgb(0, 128, 0)");
     28  }, "Check that grid items can query grid container");
     29 </script>