tor-browser

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

line-clamp-with-abspos-007.html (1039B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: abspos whose containing block is the line-clamp container gets painted</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-with-abspos-005-ref.html">
      7 <meta name="assert" content="Absolute positioned boxes in a line-clamp container are shown if and only if their containing block precedes or contains the clamp point. In this case, the containing block is the line-clamp container, so the abspos gets shown, even if its static position is after the clamp point.">
      8 <style>
      9 .clamp {
     10  line-clamp: 4;
     11  font: 16px / 32px serif;
     12  padding: 0 4px;
     13  white-space: pre;
     14  background-color: yellow;
     15  position: relative;
     16 }
     17 .abspos {
     18  position: absolute;
     19  top: 0;
     20  left: 0;
     21  width: 20px;
     22  height: 20px;
     23  background-color: skyblue;
     24 }
     25 </style>
     26 <div class="clamp">Line 1
     27 Line 2
     28 Line 3
     29 Line 4
     30 <div class="abspos"></div>Line 5</div>