Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-align/abspos/align-self-default-overflow-htb-rtl-htb.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<style>
body {
margin: 0;
}
.container {
writing-mode: horizontal-tb;
direction: rtl;
display: inline-block;
position: relative;
margin: 20px;
border: solid 4px;
width: 100px;
height: 100px;
}
.item {
writing-mode: horizontal-tb;
direction: ltr;
position: absolute;
background: green;
align-self: center;
}
.inner {
width: 20px;
height: 20px;
}
.rtl {
direction: rtl;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.item')">
<!-- No overflow, centered in IMCB. -->
<div class="container">
<div class="item" style="top: 20px; bottom: 10px;" data-offset-y="45">
<div class="inner"></div>
</div>
</div>
<!-- Overflows IMCB, but not CB. -->
<div class="container">
<div class="item" style="top: 20px; bottom: 10px;" data-offset-y="15">
<div class="inner" style="height: 80px;"></div>
</div>
</div>
<!-- Overflows weak CB edge, shifted. -->
<div class="container">
<div class="item" style="top: 20px; bottom: 10px;" data-offset-y="5">
<div class="inner" style="height: 95px;"></div>
</div>
</div>
<!-- Overflows strong CB edge, shifted. -->
<div class="container">
<div class="item" style="top: 20px; bottom: 10px;" data-offset-y="0">
<div class="inner" style="height: 120px;"></div>
</div>
</div>
<!-- No overflow, centered in IMCB. -->
<div class="container">
<div class="item" style="top: -20px; bottom: -10px;" data-offset-y="35">
<div class="inner"></div>
</div>
</div>
<!-- No overflow, centered in IMCB. -->
<div class="container">
<div class="item" style="top: -20px; bottom: -10px;" data-offset-y="-15">
<div class="inner" style="height: 120px;"></div>
</div>
</div>
<!-- Overflows strong CB edge, shifted. -->
<div class="container">
<div class="item" style="top: -20px; bottom: -10px;" data-offset-y="-20">
<div class="inner" style="height: 160px;"></div>
</div>
</div>
<!-- RTL items. -->
<br>
<!-- No overflow, centered in IMCB. -->
<div class="container">
<div class="item rtl" style="top: 20px; bottom: 10px;" data-offset-y="45">
<div class="inner"></div>
</div>
</div>
<!-- Overflows IMCB, but not CB. -->
<div class="container">
<div class="item rtl" style="top: 20px; bottom: 10px;" data-offset-y="15">
<div class="inner" style="height: 80px;"></div>
</div>
</div>
<!-- Overflows weak CB edge, shifted. -->
<div class="container">
<div class="item rtl" style="top: 20px; bottom: 10px;" data-offset-y="5">
<div class="inner" style="height: 95px;"></div>
</div>
</div>
<!-- Overflows strong CB edge, shifted. -->
<div class="container">
<div class="item rtl" style="top: 20px; bottom: 10px;" data-offset-y="0">
<div class="inner" style="height: 120px;"></div>
</div>
</div>
<!-- No overflow, centered in IMCB. -->
<div class="container">
<div class="item rtl" style="top: -20px; bottom: -10px;" data-offset-y="35">
<div class="inner"></div>
</div>
</div>
<!-- No overflow, centered in IMCB. -->
<div class="container">
<div class="item rtl" style="top: -20px; bottom: -10px;" data-offset-y="-15">
<div class="inner" style="height: 120px;"></div>
</div>
</div>
<!-- Overflows strong CB edge, shifted. -->
<div class="container">
<div class="item rtl" style="top: -20px; bottom: -10px;" data-offset-y="-20">
<div class="inner" style="height: 160px;"></div>
</div>
</div>