tor-browser

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

justify-items-computed.html (2309B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Box Alignment Level 3: getComputedStyle().justifyItems</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items">
      7 <meta name="assert" content="justify-items computed value is as specified.">
      8 <meta name="assert" content="justify-items legacy depends on inherited value.">
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <script src="/css/support/computed-testcommon.js"></script>
     12 </head>
     13 <body>
     14 <div id="container">
     15  <div id="target"></div>
     16 </div>
     17 <script>
     18 test_computed_value("justify-items", "normal");
     19 test_computed_value("justify-items", "stretch");
     20 
     21 test_computed_value("justify-items", "baseline");
     22 test_computed_value("justify-items", "last baseline");
     23 
     24 test_computed_value("justify-items", "center");
     25 test_computed_value("justify-items", "start");
     26 test_computed_value("justify-items", "end");
     27 test_computed_value("justify-items", "self-start");
     28 test_computed_value("justify-items", "self-end");
     29 test_computed_value("justify-items", "flex-start");
     30 test_computed_value("justify-items", "flex-end");
     31 test_computed_value("justify-items", "unsafe center");
     32 test_computed_value("justify-items", "safe self-end");
     33 test_computed_value("justify-items", "right");
     34 test_computed_value("justify-items", "safe left");
     35 
     36 test_computed_value("justify-items", "legacy", "normal");
     37 test_computed_value("justify-items", "legacy left");
     38 test_computed_value("justify-items", "legacy right");
     39 test_computed_value("justify-items", "legacy center");
     40 
     41 test(() => {
     42  const container = document.getElementById('container');
     43  const target = document.getElementById('target');
     44  target.style.justifyItems = 'legacy';
     45  container.style.justifyItems = 'legacy left';
     46  assert_equals(getComputedStyle(target).justifyItems, 'legacy left');
     47  container.style.justifyItems = 'legacy right';
     48  assert_equals(getComputedStyle(target).justifyItems, 'legacy right');
     49  container.style.justifyItems = 'legacy center';
     50  assert_equals(getComputedStyle(target).justifyItems, 'legacy center');
     51  container.style.justifyItems = 'flex-end';
     52  assert_equals(getComputedStyle(target).justifyItems, 'normal');
     53 }, 'justify-items legacy depends on inherited value');
     54 </script>
     55 </body>
     56 </html>