tor-browser

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

fixed-block-size-flex-stretch.https.html (941B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedblocksize">
      4 <link rel="match" href="../green-square-ref.html">
      5 <meta name="assert" content="This test checks that LayoutConstraints#fixedBlockSize is passed into the layout function correctly." />
      6 <style>
      7 body {
      8  display: flex;
      9  height: 50px;
     10 }
     11 
     12 .test {
     13  background: red;
     14  --expected-block-size: 40; /* flex-item should stretch to (50 - 10)px */
     15  width: 100px;
     16  margin-bottom: 10px;
     17 }
     18 
     19 .child {
     20  background: green;
     21 }
     22 
     23 @supports (display: layout(test)) {
     24  .test {
     25    display: layout(test);
     26  }
     27 }
     28 </style>
     29 <script src="/common/reftest-wait.js"></script>
     30 <script src="/common/worklet-reftest.js"></script>
     31 
     32 <div class="test">
     33  <div class="child"></div>
     34 </div>
     35 
     36 <script>
     37 importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-block-size.js'});
     38 </script>