tor-browser

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

available-size-008.html (2086B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Testing Available Space in Orthogonal Flows / ICB / tall max-height scroller</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, and there's a scroller with max-height, but that scroller has a taller max-height 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 div div {
     11  writing-mode: vertical-rl;
     12  font-family: monospace;
     13  font-size: 20px;
     14  position: relative; /* to be a container for #red*/
     15 }
     16 :root { overflow: hidden; }
     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  overflow: hidden;
     42  max-height: 120vh;
     43 }
     44 </style>
     45 
     46 <p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>.
     47 
     48 <section>
     49 <div>
     50 <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>
     51 </div>
     52 </section>