fixed-block-size-grid-stretch.https.html (951B)
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: grid; 9 grid: 50px / auto-flow; 10 } 11 12 .test { 13 background: red; 14 --expected-block-size: 40; /* grid-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>