tor-browser

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

available-size-005.html (2223B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Testing Available Space in Orthogonal Flows / height / not remaining size</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-001-ref.html">
      7 <meta name="assert" content="When an orthogonal flow's parent doesn't have a definite block size and the nearest ancestor scroller does a have fixed height, use that whole height, even if some other content already consumes some of it.">
      8 <style>
      9 #scroller {
     10  font-family: monospace; /* to be able to reliably measure things in ch*/
     11  font-size: 20px;
     12  height: 8ch;
     13  width: 300px; /* Shrinkwrapping this div is not what we're interested in testing here, so give it a width. See nested-orthogonal-001.html for that. */
     14  overflow: hidden;
     15  color: transparent;
     16  position: relative; /* to act as a container of #red */
     17 }
     18 
     19 #parent { padding-bottom: 2ch; } /* so that the content height of the parent and of the fixed size scrolling ancestor are different */
     20 #ortho { writing-mode: vertical-rl; }
     21 
     22 span {
     23  background: green;
     24  display: inline-block; /* This should not change it's size or position, but makes the size of the background predictable*/
     25 }
     26 
     27 #red { /* Not necessary when when comparing to the reference, but makes human judgement easier */
     28  position: absolute;
     29  background: red;
     30  left: 0;
     31  writing-mode: vertical-rl;
     32  z-index: -1;
     33  top: 1ch;
     34 }
     35 #spacer { /* shrinks the remaining space of the parent div. */
     36  height: 1ch;
     37  width: 100%;
     38 }
     39 </style>
     40 
     41 <p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>.
     42 
     43 <div id=scroller>
     44  <aside id="red">0</aside>
     45  <div id=parent>
     46    <aside id=spacer></aside>
     47    <div id=ortho>0 0 0 0 <span>0</span> 0 0 0</div>
     48  </div>
     49  <!-- If the inner div take its height from the height of its scrollable
     50  ancestor, it should wrap just right for the green 0 to overlap with the red
     51  one. If instead it takes it size from the remaining height after having
     52  removed #spacer, or does some other calculation that takes #spacer into
     53  account, it won't line up with #red.-->
     54 </div>