tor-browser

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

line-clamp-029.html (1115B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: line-clamp with -webkit-box without -webkit-box-orient</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-029-ref.html">
      7 <meta name="assert" content="If display: -webkit-box is present on the same box as line-clamp but -webkit-box-orient: vertical isn't, it does not become a block container, which makes line-clamp not apply.">
      8 <style>
      9 .clamp {
     10  display: -webkit-box;
     11  line-clamp: 4;
     12  font: 16px / 32px serif;
     13  white-space: pre;
     14  background-color: yellow;
     15 
     16  /* If display: -webkit-box behaves the same as without line-clamp,
     17  * these properties would cause the anonymous inline box to be centered. */
     18  -webkit-box-align: center;
     19  -webkit-box-pack: center;
     20  align-items: center;
     21  justify-content: center;
     22 }
     23 </style>
     24 
     25 <p>The test passes if you see five horizontally centered lines that don't contain an ellipsis.</p>
     26 
     27 <div class="clamp"><div>Line 1
     28 Line 2
     29 Line 3
     30 Line 4
     31 Line 5</div></div>