webkit-line-clamp-026.html (1041B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: Dynamically changing -webkit-box-orient when -webkit-line-clamp applies</title> 4 <link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au"> 5 <link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp"> 6 <link rel="match" href="reference/webkit-line-clamp-026-ref.html"> 7 <meta name="assert" content="Dynamically changing a -webkit-line-clamp affected element to be -webkit-box-orient:horizontal should cause the line clamp to be removed."> 8 <style> 9 .clamp { 10 display: -webkit-box; 11 -webkit-box-orient: vertical; 12 -webkit-line-clamp: 3; 13 font: 16px / 32px monospace; 14 white-space: pre; 15 background-color: yellow; 16 overflow: hidden; /* can be removed once implementations update their old -webkit-line-clamp implementations */ 17 } 18 </style> 19 <div class="clamp">Line 1 20 Line 2 21 Line 3 22 Line 4 23 Line 5</div> 24 <p>Following content.</p> 25 <script> 26 document.body.offsetTop; 27 document.querySelector(".clamp").style.webkitBoxOrient = "horizontal"; 28 </script>