tor-browser

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

webkit-line-clamp-049.html (964B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: -webkit-line-clamp block in inline</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/webkit-line-clamp-049-ref.html">
      7 <meta name="assert" content="If -webkit-line-clamp is a block inside an inline, it works correctly.">
      8 
      9 <style>
     10 p span clamp {
     11  display: -webkit-box;
     12  -webkit-box-orient: vertical;
     13  -webkit-line-clamp: 4;
     14  overflow: hidden; /* can be removed once implementations update their old -webkit-line-clamp implementations */
     15  font: 16px / 32px serif;
     16  white-space: pre;
     17  background-color: yellow;
     18 }
     19 </style>
     20 
     21 <p><span>The following yellow box should clamp after 4 lines.
     22 
     23 <!-- Using a <clamp> element rather than e.g. <div class="clamp"> so the parser doesn't close the <p>.-->
     24 <clamp>Line 1
     25 Line 2
     26 Line 3
     27 Line 4
     28 Line 5</clamp>
     29 
     30 </span></p>