<!DOCTYPE html>
<style>
.container {
width: 200px;
height: 100px;
font: 100px/1 Ahem, sans-serif;
background-color: red;
margin-bottom: 50px;
color: green;
}
.float-left-long {
margin-right: 100px;
width: 100px;
height: 50px;
float: left;
background-color: green;
shape-outside: inset(0 100% 0 0);
}
.float-left-short {
width: 100px;
height: 50px;
float: left;
background-color: green;
clear: left;
}
.float-right-long {
margin-left: 100px;
width: 100px;
height: 50px;
float: right;
background-color: green;
shape-outside: inset(0 0 0 100%);
}
.float-right-short {
width: 100px;
height: 50px;
float: right;
background-color: green;
clear: right;
}
</style>
<script src="../../../resources/ahem.js"></script>
<body>
<p>If two floats affect the same line and the longer float has a shape that makes it short, then the other float should be respected as the offset for the line.</p>
<p>You should see two green rectanges. There should be no red.</p>
<div class="container">
<div class="float-left-long"></div>
<div class="float-left-short"></div>
X
</div>
<div class="container" style="text-align: right">
<div class="float-right-long"></div>
<div class="float-right-short"></div>
X
</div>
</body>