tor-browser

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

text-box-trim-line-clamp-002.html (960B)


      1 <!DOCTYPE html>
      2 <title>text-box-trim applies to the last line before line-clamp, even if it's in a nested block</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim">
      4 <link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-edge">
      5 <link ref="help" href="https://www.w3.org/TR/css-overflow-4/#line-clamp">
      6 <link rel="match" href="text-box-trim-line-clamp-001-ref.html">
      7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
      8 <style>
      9 .spacer {
     10  background: lightgray;
     11  block-size: 100px;
     12 }
     13 .target {
     14  font: 50px/2 Ahem;
     15  text-box-trim: trim-end;
     16  text-box-edge: text;
     17 }
     18 .clamp {
     19  line-clamp: 3;
     20 }
     21 @supports not (line-clamp: 3) {
     22  .clamp {
     23    -webkit-line-clamp: 3;
     24    display: -webkit-box;
     25    -webkit-box-orient: vertical;
     26    overflow: hidden;
     27  }
     28 }
     29 </style>
     30 <div class="spacer"></div>
     31 <div class="target clamp">
     32  A<br>
     33  B
     34  <div>
     35    C<br>
     36    D
     37  </div>
     38  E
     39 </div>
     40 <div class="spacer"></div>