Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 12 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-align/blocks/safe-justify-self-vlr.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<style>
body {
margin: 0;
}
.container {
writing-mode: vertical-lr;
direction: ltr;
display: inline-block;
position: relative;
margin: 15px;
outline: solid 4px;
width: 40px;
height: 40px;
}
.item {
background: green;
width: 50px;
height: 50px;
}
.safe {
justify-self: safe end;
}
.unsafe {
justify-self: unsafe end;
}
.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')">
SAFE<br>
<div class="container">
<div class="item safe" style="writing-mode: horizontal-tb; direction: ltr;"
data-offset-y="0"></div>
</div>
<div class="container">
<div class="item safe" style="writing-mode: horizontal-tb; direction: rtl;"
data-offset-y="0"></div>
</div>
<div class="container">
<div class="item safe" style="writing-mode: veritcal-rl; direction: ltr;"
data-offset-y="0"></div>
</div>
<div class="container">
<div class="item safe" style="writing-mode: vertical-rl; direction: rtl;"
data-offset-y="0"></div>
</div>
<div class="container">
<div class="item safe" style="writing-mode: vertical-lr; direction: ltr;"
data-offset-y="0"></div>
</div>
<div class="container">
<div class="item safe" style="writing-mode: vertical-lr; direction: rtl;"
data-offset-y="0"></div>
</div>
<br>UNSAFE<br>
<div class="container">
<div class="item unsafe" style="writing-mode: horizontal-tb; direction: ltr;"
data-offset-y="-10"></div>
</div>
<div class="container">
<div class="item unsafe" style="writing-mode: horizontal-tb; direction: rtl;"
data-offset-y="-10"></div>
</div>
<div class="container">
<div class="item unsafe" style="writing-mode: veritcal-rl; direction: ltr;"
data-offset-y="-10"></div>
</div>
<div class="container">
<div class="item unsafe" style="writing-mode: vertical-rl; direction: rtl;"
data-offset-y="-10"></div>
</div>
<div class="container">
<div class="item unsafe" style="writing-mode: vertical-lr; direction: ltr;"
data-offset-y="-10"></div>
</div>
<div class="container">
<div class="item unsafe" style="writing-mode: vertical-lr; direction: rtl;"
data-offset-y="-10"></div>
</div>
<br>SAFE RTL<br>
<div class="container rtl">
<div class="item safe" style="writing-mode: horizontal-tb; direction: ltr;"
data-offset-y="-10"></div>
</div>
<div class="container rtl">
<div class="item safe" style="writing-mode: horizontal-tb; direction: rtl;"
data-offset-y="-10"></div>
</div>
<div class="container rtl">
<div class="item safe" style="writing-mode: veritcal-rl; direction: ltr;"
data-offset-y="-10"></div>
</div>
<div class="container rtl">
<div class="item safe" style="writing-mode: vertical-rl; direction: rtl;"
data-offset-y="-10"></div>
</div>
<div class="container rtl">
<div class="item safe" style="writing-mode: vertical-lr; direction: ltr;"
data-offset-y="-10"></div>
</div>
<div class="container rtl">
<div class="item safe" style="writing-mode: vertical-lr; direction: rtl;"
data-offset-y="-10"></div>
</div>
<br>UNSAFE RTL<br>
<div class="container rtl">
<div class="item unsafe" style="writing-mode: horizontal-tb; direction: ltr;"
data-offset-y="0"></div>
</div>
<div class="container rtl">
<div class="item unsafe" style="writing-mode: horizontal-tb; direction: rtl;"
data-offset-y="0"></div>
</div>
<div class="container rtl">
<div class="item unsafe" style="writing-mode: veritcal-rl; direction: ltr;"
data-offset-y="0"></div>
</div>
<div class="container rtl">
<div class="item unsafe" style="writing-mode: vertical-rl; direction: rtl;"
data-offset-y="0"></div>
</div>
<div class="container rtl">
<div class="item unsafe" style="writing-mode: vertical-lr; direction: ltr;"
data-offset-y="0"></div>
</div>
<div class="container rtl">
<div class="item unsafe" style="writing-mode: vertical-lr; direction: rtl;"
data-offset-y="0"></div>
</div>