grid-abspos-staticpos-align-self-vertWM-last-baseline-002.html (1731B)
1 <!DOCTYPE html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html> 7 <head> 8 <meta charset="utf-8"> 9 <title>CSS Test: Static position of abspos horizontal-tb children in a vertical-rl grid container, with various "align-self" values</title> 10 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 11 <link rel="help" href="https://drafts.csswg.org/css-grid/#abspos-items"> 12 <link rel="match" href="grid-abspos-staticpos-align-self-vertWM-last-baseline-002-ref.html"> 13 <style> 14 .container { 15 display: grid; 16 writing-mode: vertical-rl; 17 padding: 2px 1px; 18 border: 1px solid black; 19 background: yellow; 20 margin-bottom: 5px; 21 margin-right: 5px; 22 float: left; /* For testing in "rows" of containers */ 23 position: relative; 24 } 25 br { clear: both } 26 27 .big > .container { 28 width: 30px; 29 height: 22px; 30 grid: 2px 20px 2px / 3px 14px 3px; 31 } 32 .small > .container { 33 grid: 0px 2px 0px / 3px 2px 3px; 34 width: 2px; 35 height: 4px; 36 margin-right: 10px; /* To avoid overlap between overflowing kids */ 37 } 38 39 .container > * { 40 position: absolute; 41 writing-mode: horizontal-tb; 42 grid-area: 2 / 2 / 3 / 3; 43 background: teal; 44 width: 6px; 45 height: 8px; 46 } 47 </style> 48 </head> 49 <body> 50 <!-- The last baseline value, from 51 https://www.w3.org/TR/css-align-3/#propdef-align-self --> 52 <div class="big"> 53 <div class="container"><div style="align-self: last baseline"></div></div> 54 </div> 55 <div class="small"> 56 <div class="container"><div style="align-self: last baseline"></div></div> 57 </div> 58 </body> 59 </html>