available-size-013.html (1981B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Testing Available Space in Orthogonal Flows / height + min-height/ content height</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 have a fixed height, use that, increased by the min-height if it is set and is larger (same as -003, with min-height)."> 8 <style> 9 #scroller { 10 font-family: monospace; /* to be able to reliably measure things in ch*/ 11 font-size: 20px; 12 height: 4ch; 13 min-height: 8ch; 14 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. */ 15 overflow: hidden; 16 color: transparent; 17 position: relative; /* to act as a container of #red */ 18 padding: 1ch 0; 19 } 20 21 #parent { padding-bottom: 2ch; } /* so that the content height of the parent and of the fixed size scrolling ancestor are different */ 22 #ortho { writing-mode: vertical-rl; } 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 } 28 29 #red { /* Not necessary when when comparing to the reference, but makes human judgement easier */ 30 position: absolute; 31 background: red; 32 left: 0; top: 1ch; 33 writing-mode: vertical-rl; 34 z-index: -1; 35 } 36 </style> 37 38 <p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>. 39 40 <div id=scroller> 41 <aside id=red>0</aside> 42 <div id=parent> 43 <div id=ortho>0 0 0 0 <span>0</span> 0 0 0</div> 44 <!-- If this div take its height from the height of its scrollable ancestor, 45 it should wrap just right for the green 0 to overlap with the red one. --> 46 </div> 47 </div>