tor-browser

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

container-units-computational-independence.html (883B)


      1 <!doctype html>
      2 <title>Container Relative Units: Computationally independent</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-conditional-5/#container-lengths">
      4 <link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#computationally-independent">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="support/cq-testcommon.js"></script>
      8 <script>
      9  setup(() => assert_implements_size_container_queries());
     10 
     11  const units = ['cqw', 'cqh', 'cqi', 'cqb', 'cqmin', 'cqmax'];
     12 
     13  for (let unit of units) {
     14    test(function() {
     15      assert_throws_dom('SyntaxError', () => {
     16        CSS.registerProperty({ name: '--x', inherits: false, syntax: '<length>', initialValue: `1${unit}` });
     17      });
     18    }, `Container relative unit ${unit} is not computationally independent`);
     19  }
     20 </script>