tor-browser

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

line-clamp-023.tentative.html (960B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: when clamping by lines, collapsed margins are respected</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-023-ref.html">
      7 <meta name="assert" content="When line-clamp is used with a number of lines, the box and its clamped children should be sized taking margin collapsing into account.">
      8 <style>
      9 .clamp {
     10  line-clamp: 4;
     11  font: 16px / 32px serif;
     12  padding: 4px;
     13  background-color: yellow;
     14  border: 2px solid black;
     15 }
     16 .inner {
     17  background-color: orange;
     18  margin: 4px;
     19  /* There is no border, so the margins of the .inner boxes will collapse */
     20 }
     21 .inner .inner {
     22  white-space: pre;
     23 }
     24 </style>
     25 <div class="clamp"><div class="inner"><div class="inner">Line 1
     26 Line 2
     27 Line 3
     28 Line 4
     29 Line 5
     30 Line 6</div></div></div>
     31 <p>Following content.</p>