available-size-002.html (1551B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Testing Available Space in Orthogonal Flows / max-height / no 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 ancestor doesn't have a definite block size but does have a fixed max-height, but isn't a scroller, do not use that size."> 8 <style> 9 body > div { 10 font-family: monospace; /* to be able to reliably measure things in ch*/ 11 font-size: 20px; 12 max-height: 8ch; /* **max**-height does not give the element a definite block size */ 13 color: transparent; 14 position: relative; /* to act as a container of #green */ 15 } 16 17 div > div > div { writing-mode: vertical-rl; } 18 19 span { 20 background: white; 21 display: inline-block; /* This should not change it's size or position, but makes the size of the background predictable*/ 22 } 23 24 #green { 25 position: absolute; 26 background: green; 27 left: 0; 28 writing-mode: vertical-rl; 29 z-index: -1; 30 } 31 </style> 32 33 <p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>. 34 35 <div> 36 <div> 37 <aside id="green">0</aside> 38 <div>0 0 0 0 <span>0</span> 0 0 0</div> <!-- If this div takes its height from 39 the max-height of its parent (which it shouldn't, since it's not a scroller), 40 it should wrap just right for the white 0 to 41 overlap with the green one. --> 42 </div> 43 </div>