flex-abspos-staticpos-align-self-safe-001.html (1355B)
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 <title>CSS Test: Testing safe overflow-position for align-self in absolutely positioned boxes in flex containers</title> 9 <link rel="author" title="Mihir Iyer" href="mailto:miyer@mozilla.com"> 10 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items"> 11 <link rel="match" href="flex-abspos-staticpos-align-self-safe-001-ref.html"> 12 <meta charset="utf-8"> 13 <style> 14 .flex { 15 display: flex; 16 height: 50px; 17 width: 50px; 18 border: 3px solid black; 19 vertical-align: top; 20 margin: 20px; 21 position: relative; 22 } 23 .child { 24 border: 2px dotted purple; 25 background: teal; 26 width: 65px; 27 height: 65px; 28 align-self: safe center; 29 position: absolute; 30 background: yellow; 31 } 32 .rowDir { 33 flex-direction: row; 34 } 35 .colDir { 36 flex-direction: column; 37 } 38 .vertRL { 39 writing-mode: vertical-rl; 40 } 41 </style> 42 </head> 43 <body> 44 <div class="flex rowDir"><div class="child"></div></div> 45 <div class="flex colDir"><div class="child"></div></div> 46 <div class="flex rowDir vertRL"><div class="child"></div></div> 47 <div class="flex colDir vertRL"><div class="child"></div></div> 48 </body> 49 </html>