Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<link rel="match" href="orthogonal-static-position-margin-ref.html">
<meta name="assert" content="This test checks that margins are correctly applied to an absolutely positioned element with static position when the parent has an orthogonal flipped writing mode.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
body {
margin: 0;
font: 20px/1 Ahem;
}
.cb {
position: relative;
width: 400px;
height: 100px;
margin-bottom: 10px;
}
.abspos {
position: absolute;
width: 50px;
height: 50px;
background: green;
margin-right: 20px;
}
</style>
<p>Test passes if there are two green squares, side by side with their parent's right edge.</p>
<!-- Test 1: vertical-rl parent (block-flipped) -->
<div class="cb">
<div style="writing-mode: vertical-rl; width: 200px; height: 100px">
<div class="abspos"></div>
</div>
</div>
<!-- Test 2: direction:rtl parent (inline-flipped) -->
<div class="cb">
<div style="direction: rtl; width: 200px; height: 100px">
<div class="abspos" style="writing-mode: vertical-rl"></div>
</div>
</div>