tor-browser

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

attr-container-style-query.html (668B)


      1 <!DOCTYPE html>
      2 <title>CSS Values and Units Test: attr() in container style queries</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 <style>
      7  #container {
      8    --foo: bar;
      9  }
     10  @container style(--foo: attr(data-foo type(<custom-ident>))) {
     11    #target { color: green; }
     12  }
     13 </style>
     14 <div id="container" data-foo="bar">
     15  <div id="target">Should be green</div>
     16 </div>
     17 <script>
     18  test(() => {
     19    assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)");
     20  }, "style query should implement to true");
     21 </script>