tor-browser

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

white-space-intrinsic-size-001.html (1517B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Text Test: min-content sizing and white-space: break-spaces</title>
      4 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
      5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-white-space">
      6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
      7 <link rel="match" href="reference/white-space-intrinsic-size-001-ref.html">
      8 <meta name="assert" content="When white-space is break-spaces, preserved spaces at the end of the line do affect the intrinsic min-content size. Overflow-wrap makes no difference.">
      9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     10 <style>
     11 aside {
     12  float: left;
     13  white-space: break-spaces;
     14  background: green;
     15 }
     16 aside:last-of-type { overflow-wrap: break-word; }
     17 div {
     18  font-family: Ahem;
     19  color: transparent;
     20  font-size: 50px;
     21  width: 0ch;
     22 }
     23 
     24 #red {
     25  position: absolute;
     26  background: red;
     27  width: auto;
     28  z-index: -1;
     29 }
     30 </style>
     31 
     32 <p>Test passes if there is a green rectangle below and no red.
     33 <div id=red>XS<br>S<br>XS<br>S</div>
     34 <div>
     35  <aside>X  </aside>
     36  <aside>X  </aside>
     37 </div>
     38 <!-- Note: the space immediately following the X does not get wrapped,
     39 even under break-spaces+break-word:
     40 The parent of the flow is 0-width,
     41 so the float is min-content sized,
     42 which should leave enough room for both the X and one space.
     43 break-space+break-word would allow for an emergency wrap before the space
     44 if the float itself was sized too small,
     45 but it isn't.
     46 -->