hanging-scrollable-001.html (971B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text Test: hanging punctuation is scrollable overflow</title> 4 <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> 5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#hanging-punctuation-property"> 6 <link rel="match" href="reference/hanging-scrollable-001-ref.html"> 7 <meta name="assert" content="Hanging characters that overflow their block container are treated as scrollable overflow. "> 8 <style> 9 div { 10 font-family: monospace; 11 font-size: 50px; 12 hanging-punctuation: last; 13 overflow: hidden; 14 color: red; 15 } 16 span {color: white; } 17 </style> 18 19 <p>Test passes if there is no red below. 20 <table><tr><td><div id="t">X<span>”</span></div></table> 21 <!-- 22 The table is to do sizing based on the min content size. 23 A simpler test could be written using `div { width: min-content; }`, 24 but that is not widely supported yet. 25 --> 26 27 <script> 28 document.getElementById("t").scrollLeft=100; 29 </script>