tor-browser

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

line-clamp-with-abspos-021.html (1011B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: line-clamp: auto hidden block-level abspos</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-005-ref.html">
      7 <meta name="assert" content="Block-level abspos should still be hidden if its containing block is after the clamp point with line-clamp: auto, even if it lies on the boundary because the automatic size of previous boxes was adjusted.">
      8 <style>
      9 .clamp {
     10  line-clamp: auto;
     11  max-height: 4lh;
     12  font: 16px / 32px serif;
     13  padding: 0 4px;
     14  background-color: yellow;
     15 }
     16 .inner {
     17  white-space: pre;
     18 }
     19 .rel {
     20  position: relative;
     21 }
     22 .abspos {
     23  position: absolute;
     24  width: 100px;
     25  height: 100px;
     26  background-color: skyblue;
     27 }
     28 </style>
     29 
     30 <div class="clamp">
     31 <div class="inner">Line 1
     32 Line 2
     33 Line 3
     34 Line 4
     35 Line 5
     36 Line 6</div>
     37 <div class="rel"><div class="abspos"></div></div>
     38 </div>