tor-browser

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

negative-min.https.html (989B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#interaction-sizing">
      4 <link rel="match" href="negative-ref.html">
      5 <meta name="assert" content="This test checks that min-content-size is correctly clamped to zero." />
      6 
      7 <style>
      8 
      9 .test {
     10  background: red;
     11  border: solid 2px;
     12  height: 100px;
     13  width: min-content;
     14 }
     15 
     16 @supports (display: layout(min-content-size-negative)) {
     17  .test {
     18    display: layout(min-content-size-negative);
     19    background: green;
     20  }
     21 }
     22 </style>
     23 <script src="/common/reftest-wait.js"></script>
     24 <script src="/common/worklet-reftest.js"></script>
     25 
     26 <div class="test"></div>
     27 
     28 <script id="code" type="text/worklet">
     29 registerLayout('min-content-size-negative', class {
     30  async intrinsicSizes() {
     31    return { minContentSize: -100 };
     32  }
     33  async layout() {}
     34 });
     35 </script>
     36 
     37 <script>
     38 importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
     39 </script>
     40 </html>