contain-style-breaks-002.html (1263B)
1 <!doctype html> 2 <html lang=en> 3 <meta charset=utf-8> 4 <title>CSS-contain test: style containment and break-inside:avoid</title> 5 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> 6 <meta name=flags content=""> 7 <meta name=assert content="style containment is not (any longer) supposed to have any effect on the break-inside property. Same as -001, applying containment on the parent."> 8 <link rel="match" href="reference/contain-style-breaks-001-ref.html"> 9 <link rel=help href="https://drafts.csswg.org/css-contain-1/#containment-style"> 10 11 <style> 12 article { 13 columns: 2 1ch; 14 column-gap: 0; 15 float: left; 16 font-family: monospace; 17 margin-right: 3em; 18 } 19 div > div { 20 page-break-inside: avoid; 21 break-inside: avoid; 22 } 23 #test > div { 24 contain: style; 25 } 26 </style> 27 28 <p>Test passes if there are two identical blocks “A” letters below. 29 <article id=ref> 30 <div> 31 <div> 32 A<br> 33 A<br> 34 A<br> 35 A 36 <div> 37 </div> 38 </article> 39 <article id=test> 40 <div> 41 <div> 42 A<br> 43 A<br> 44 A<br> 45 A 46 <div> 47 </div> 48 </article> 49 <!-- 50 Having two blocks to avoid making browsers that don't support the property at all fail. 51 Since containment is supposed to have no effect, failing such browsers would not be useful. 52 -->