Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-flexbox/abspos/flex-abspos-align-self-safe-outer-cb-002.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>CSS Test: Testing safe overflow-position for align-self in absolutely positioned boxes in flex containers w/ item margin if the CB is not the flex container</title>
<link rel="match" href="flex-abspos-align-self-safe-outer-cb-002-ref.html">
<meta charset="utf-8">
<style>
.container {
border: 3px solid blue;
position: relative;
width: 200px;
margin: 50px;
}
.flex {
display: flex;
height: 50px;
width: 50px;
border: 3px solid black;
vertical-align: top;
margin-left: 125px;
}
.child {
border: 2px dotted purple;
background: teal;
width: 225px;
height: 75px;
align-self: safe center;
position: absolute;
background: yellow;
opacity: 0.5;
margin: 5px;
}
.rowDir {
flex-direction: row;
}
.colDir {
flex-direction: column;
}
.vertRL {
writing-mode: vertical-rl;
}
</style>
</head>
<body>
<div class="container">
<div class="flex rowDir"><div class="child"></div></div>
</div>
<div class="container">
<div class="flex colDir"><div class="child"></div></div>
</div>
<div class="container">
<div class="flex rowDir vertRL"><div class="child"></div></div>
</div>
<div class="container">
<div class="flex colDir vertRL"><div class="child"></div></div>
</div>
</body>
</html>