tor-browser

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

line-clamp-auto-003.tentative.html (793B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: `line-clamp: auto` with bp and box-sizing: border-box</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-002-ref.html">
      7 <meta name="assert" content="line-clamp: auto should clamp fine with border and padding, even with box-sizing: border-box">
      8 <style>
      9 .clamp {
     10  line-clamp: auto;
     11  max-height: 138px; /* 32px * 4 + (1px + 4px) * 2 */
     12  box-sizing: border-box;
     13  font: 16px / 32px serif;
     14  white-space: pre;
     15  background-color: yellow;
     16  margin: 2px;
     17  border: 1px solid black;
     18  padding: 4px;
     19 }
     20 </style>
     21 <div class="clamp">Line 1
     22 Line 2
     23 Line 3
     24 Line 4
     25 Line 5
     26 Line 6</div>