tor-browser

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

available-size-019.html (2010B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Testing Available Space in Orthogonal Flows / ICB / tall max-height parent</title>
      4 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
      5 <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto">
      6 <link rel="match" href="reference/available-size-002-ref.html">
      7 <meta name="assert" content="When an orthogonal flow's parent doesn't have a definite block size, but has a max-height, but that max-height is than the ICB, use the ICB instead.">
      8 <style>
      9 body { margin-top: 0; margin-bottom: 0; } /* Shouldn't matter, but in some browsers does. -007 tests this aspect specifically. */
     10 :root { overflow: hidden; }
     11 div {
     12  writing-mode: vertical-rl;
     13  font-family: monospace;
     14  font-size: 20px;
     15  position: relative; /* to be a container for #red*/
     16 }
     17 .spacer { /* using 5 spacers of 20vh each instead of a single large one, so
     18             that the line would wrap between spacers if it ends up being
     19             shorter thatn 100vh*/
     20  display: inline-block;
     21  height: calc(20vh - 0.1px); /*Using this instead of 20vh, to account for accumulation of rounding errors, that might make 5*20vh taller than 100vh in some browsers*/
     22 }
     23 
     24 span {
     25  background: green;
     26  display: inline-block; /* This should not change it's size or position, but makes the size of the background predictable*/
     27  color: transparent;
     28 }
     29 
     30 #red { /* Not necessary when when comparing to the reference, but makes human judgement easier */
     31  position: absolute;
     32  background: red;
     33  writing-mode: vertical-rl;
     34  z-index: -1;
     35  font-family: monospace;
     36  font-size: 20px;
     37  left: 0; top: 0;
     38 }
     39 
     40 section {
     41  max-height: 120vh;
     42 }
     43 </style>
     44 
     45 <p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>.
     46 
     47 <section>
     48 <div><aside id="red">0</aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside> <span>0</span></div>
     49 </section>