widows-orphans-001.html (1111B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Fragmentation level 3 Test: widows and block level boxes</title> 4 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> 5 <link rel="help" href="https://drafts.csswg.org/css-break/#widows-orphans"> 6 <link rel="match" href="reference/widows-orphans-001-ref.html"> 7 <meta name="assert" content="The widows property has no effect on block container boxes that contains only block-level boxes."> 8 <style> 9 div p { margin: 0; } 10 11 div { 12 columns: 2; 13 column-gap: 0; 14 position: absolute; /* shrinkwrap. Using an explicit width in 'ch' with a monospace font would be fine as well if all UAs supported 'ch', but some don't. */ 15 column-fill: balance-all; /* to make sure it balances as well on paged media */ 16 17 widows: 4; 18 } 19 20 /* If the property applied to block container boxes that contain block-level boxes, 21 it would force the two two-line paragraphs to stick together.*/ 22 23 </style> 24 <body> 25 <p>Test passes if there are 4 “X” characters <strong>arranged in a 2 by 2 square</strong> below. 26 27 <div> 28 <p>X<br>X 29 <p>X<br>X 30 </div> 31 </body>