tor-browser

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

style-query-with-unknown-width.html (921B)


      1 <!DOCTYPE html>
      2 <title>CSS Container Queries Test: style and size query against container without a principal box</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-conditional-5/#container-queries">
      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  #container {
      9    container-type: inline-size;
     10    display: contents;
     11    --foo: bar;
     12  }
     13  @container (width >= 0px) or style(--foo: bar) {
     14    #target { color: green; }
     15  }
     16 </style>
     17 <div id="container">
     18  <div id="target">Should be green</div>
     19 </div>
     20 <script>
     21  setup(() => {
     22    assert_implements_style_container_queries();
     23    assert_implements_size_container_queries();
     24  });
     25 
     26  test(() => {
     27    assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)");
     28  }, "width query should evaluate to unknown and style query to true");
     29 </script>