text-02.https.html (1123B)
1 <!DOCTYPE html> 2 <html class=reftest-wait> 3 <link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#layout-children"> 4 <link rel="match" href="../green-square-ref.html"> 5 <meta name="assert" content="This test checks that text children are correctly blockified when no other children exist." /> 6 7 <style> 8 /* We have a wrapper in this test to ensure that any text that is positioned 9 * slightly outside the "test" box doesn't affect the rendering. 10 * This wrapper has a 10px inline padding which does the trick. */ 11 .wrapper { 12 background: green; 13 padding: 0 10px; 14 width: 80px; 15 } 16 17 .test { 18 --child-expected: ["default"]; 19 20 background: red; 21 color: green; 22 width: 80px; 23 --child: default; 24 } 25 26 @supports (display: layout(test)) { 27 .test { 28 background: green; 29 display: layout(test); 30 } 31 } 32 </style> 33 <script src="/common/reftest-wait.js"></script> 34 <script src="/common/worklet-reftest.js"></script> 35 36 <div class="wrapper"> 37 <div class="test"> 38 Text text text 39 </div> 40 </div> 41 42 <script> 43 importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-worklet.js'}); 44 </script>