text-wrap-balance-before-after-002-ref.html (910B)
1 <!DOCTYPE html> 2 <style> 3 .container { 4 font: 16px monospace; 5 margin: 1em; 6 width: 60ch; 7 outline: 1px dashed gray; 8 } 9 10 .text { 11 text-wrap: balance; 12 } 13 14 .text-before { 15 letter-spacing: -0.15ch; 16 margin-bottom: 1em; 17 text-wrap: balance; 18 } 19 20 .text-after { 21 text-wrap-style: stable; 22 margin-top: 1em; 23 } 24 </style> 25 26 <p>The first two paragraphs should be separately balanced; the third should not use balancing:</p> 27 28 <div class="container"> 29 <div class="text-before"> 30 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 31 </div> 32 <div class="text"> 33 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 34 </div> 35 <div class="text-after"> 36 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 37 </div> 38 </div>