tor-browser

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

line-clamp-auto-021.tentative.html (899B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: `line-clamp: auto` with multiple descendants</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-021-ref.html">
      7 <meta name="assert" content="line-clamp: auto works well with multiple descendants">
      8 <style>
      9 .clamp {
     10  line-clamp: auto;
     11  max-height: 5lh;
     12  font: 16px / 32px serif;
     13  background-color: yellow;
     14 }
     15 .clamp > div {
     16  /*
     17   * The total border across the top and bottom of one element is 16px.
     18   * The top and bottom borders across two elements add up to 32px = 1lh.
     19   */
     20  padding: 6px;
     21  border: 2px solid black;
     22  white-space: pre;
     23 }
     24 </style>
     25 <div class="clamp">
     26 <div>Line 1
     27 Line 2
     28 Line 3</div>
     29 <div>Line 4
     30 Line 5
     31 Line 6</div>
     32 <div>Line 7
     33 Line 8
     34 Line 9</div>
     35 </div>