tor-browser

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

line-clamp-auto-038.html (1147B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <meta charset="utf-8">
      4 <title>CSS Overflow: `line-clamp: auto` cached layout test</title>
      5 <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
      6 <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp">
      7 <link rel="match" href="reference/line-clamp-auto-038-ref.html">
      8 <meta name="assert" content="This is a test to make sure that, if lines are cached on a layout of a `line-clamp: auto` container (for example, because an inline block changed size), they should have the right behavior.">
      9 <style>
     10 .clamp {
     11  line-clamp: auto;
     12  max-height: 4lh;
     13  font: 16px / 32px serif;
     14  white-space: pre;
     15  background-color: yellow;
     16  border: 1px solid black;
     17  padding: 4px;
     18 }
     19 #inline-block {
     20  display: inline-block;
     21  background-color: orange;
     22  height: 0.5lh;
     23  width: 1em;
     24 }
     25 </style>
     26 <div class="clamp">Line 1
     27 Line 2
     28 Line 3
     29 Line <span id="inline-block"></span> 4
     30 Line 5
     31 Line 6</div>
     32 <p>Following content.</p>
     33 
     34 <script>
     35  window.onload = () => {
     36    document.getElementById("inline-block").style.width = "2em";
     37    document.documentElement.className = "";
     38  };
     39 </script>