tor-browser

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

line-clamp-with-abspos-013.html (1067B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: abspos whose containing block contains the clamp point 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-013-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 contains the clamp point, so the abspos gets painted, 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 }
     16 .rel {
     17  position: relative;
     18 }
     19 .abspos {
     20  position: absolute;
     21  top: 0;
     22  left: 0;
     23  width: 20px;
     24  height: 20px;
     25  background-color: skyblue;
     26 }
     27 </style>
     28 <div class="clamp">Line 1
     29 Line 2
     30 Line 3
     31 <div class="rel">Line 4
     32 Line 5<div class="abspos"></div></div></div>