tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

line-clamp-auto-016.html (859B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: floats pushing a line downwards</title>
      4 <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp">
      6 <link rel="match" href="reference/line-clamp-auto-016-ref.html">
      7 <meta name="assert" content="The last line before clamp should have an ellipsis, even if it's only the last line because it is pushed down by a float">
      8 <style>
      9 .parent {
     10  padding: 0 4px;
     11  background-color: yellow;
     12 }
     13 .clamp {
     14  line-clamp: auto;
     15  max-height: 5lh;
     16  font: 16px / 32px serif;
     17  white-space: pre-wrap;
     18  width: 200px;
     19 }
     20 .float {
     21  float: left;
     22  width: 300px;
     23  background-color: orange;
     24 }
     25 </style>
     26 <div class="parent">
     27 <div class="clamp">Line 1
     28 Line 2
     29 Line 3
     30 <div class="float">Float</div>Line 4
     31 Line 5
     32 Line 6</div>
     33 </div>