tor-browser

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

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


      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: 30; /* flex-item should respect the max constraint */
     15  max-height: 30px;
     16  width: 100px;
     17  margin-bottom: 10px;
     18 }
     19 
     20 .child {
     21  background: green;
     22 }
     23 
     24 @supports (display: layout(test)) {
     25  .test {
     26    display: layout(test);
     27  }
     28 }
     29 </style>
     30 <script src="/common/reftest-wait.js"></script>
     31 <script src="/common/worklet-reftest.js"></script>
     32 
     33 <div class="test">
     34  <div class="child"></div>
     35 </div>
     36 
     37 <script>
     38 importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-block-size.js'});
     39 </script>