line-breaking-atomic-008.html (967B)
1 <!doctype html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Text — atomic inline line not affected by keep-all</title> 5 <meta name=assert content="There is a soft wrap opportunity before and after an atomic inline even when word-break is keep-all"> 6 <link rel=match href="reference/line-breaking-atomic-008-ref.html" 7 <link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details"> 8 <link rel=help href="https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all"> 9 <link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style> 12 div { 13 font: 50px/1 Ahem; 14 } 15 .red { 16 position: absolute; 17 z-index: -1; 18 color: red; 19 } 20 .test { 21 width: 0; 22 color: green; 23 word-break: keep-all; 24 } 25 span { 26 display: inline-block; 27 } 28 </style> 29 30 <p>Test passes if there is a green rectangle and <strong>no red</strong>. 31 32 <div class=red>A<br>B<br>C</div> 33 <div class=test>A<span>B</span>C</div>