atomic-under-marker.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE HTML>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/licenses/publicdomain/
  5. Test: text-overflow with overflow where introducing a marker would cause
  6. the line to have no visible text or atomic inline-level content --
  7. then we should either suppress or clip the marker
  8. -->
  9. <html><head>
  10. <title>text-overflow: suppress or clip the marker when it hides all content</title>
  11. <style type="text/css">
  12. @font-face {
  13. font-family: DejaVuSansMono;
  14. src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
  15. }
  16. html,body {
  17. color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
  18. }
  19. .test {
  20. overflow:hidden;
  21. width:100px;
  22. white-space:nowrap;
  23. padding:0 100px;
  24. }
  25. span {
  26. width:97px;
  27. display:inline-block;
  28. }
  29. s {
  30. width:3px;
  31. height:10px;
  32. margin-left:-2px;
  33. display:inline-block;
  34. background:blue;
  35. }
  36. .rlo {
  37. unicode-bidi: bidi-override; direction:rtl;
  38. }
  39. .lro {
  40. unicode-bidi: bidi-override;
  41. }
  42. .rtl {
  43. direction:rtl;
  44. }
  45. .ltr {
  46. direction:ltr;
  47. }
  48. .t1 { text-overflow:ellipsis; }
  49. .t2 { text-overflow:"." ellipsis; }
  50. .t3 { text-overflow:"long" ellipsis; }
  51. i {
  52. display:inline-block;
  53. width:2px;
  54. height:10px;
  55. background:blue;
  56. }
  57. </style>
  58. </head><body>
  59. <div style="float:left;">
  60. <div class="test t1"><span>!</span><i></i>||</div> <!-- atomic under marker -->
  61. <div class="test t1"><span>!</span>||<i></i></div> <!-- atomic in padding -->
  62. <div class="test t1"><span>!</span><i style="width:20px"></i></div> <!-- atomic under marker and in padding -->
  63. <div class="test t2"><span>!</span><i></i>||</div> <!-- atomic under marker -->
  64. <div class="test t2"><span>!</span>||<i></i></div> <!-- atomic in padding -->
  65. <div class="test t2"><span>!</span><i style="width:20px"></i></div> <!-- atomic under marker and in padding -->
  66. <div class="test rtl t1"><span>!</span><i></i>||</div> <!-- atomic under marker -->
  67. <div class="test rtl t1"><span>!</span>||<i></i></div> <!-- atomic in padding -->
  68. <div class="test rtl t1"><span>!</span><i style="width:20px"></i></div> <!-- atomic under marker and in padding -->
  69. <div class="test t2"><s></s><i></i>||</div> <!-- atomic under marker -->
  70. <div class="test t3"><s></s>|<i></i></div> <!-- atomic in padding -->
  71. <div class="test t2"><s></s><i style="width:20px"></i></div> <!-- atomic under marker and in padding -->
  72. </div>
  73. </body>
  74. </html>