tor-browser

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

available-size-009.html (2372B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Testing Available Space in Orthogonal Flows / ICB / tall 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 height, but that scroller is taller 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 #ortho {
     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 than 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 #scroller {
     41  overflow: hidden;
     42  writing-mode: vertical-lr;
     43  height: 120vh;
     44 }
     45 #parent {
     46  writing-mode: horizontal-tb;
     47  width: 8em; /* avoid triggering intrinsic sizing bugs */
     48 }
     49 </style>
     50 
     51 <p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>.
     52 
     53 <div id=scroller>
     54  <div id=parent>
     55    <div id=ortho><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><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside> <span>0</span></div>
     56  </div>
     57 </div>