Inline float that clear should cause the recaclulation of available space a cluster does not fit the line.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>right-float-clear.html</title>
<style>
@page {
size: 100pt 200pt;
margin: 0;
}
html, body {
font-size: 8pt;
line-height: 10pt;
width: 150pt;
}
.test {
width: 100pt;
display: flow-root;
background: lightgrey;
margin-bottom: 10pt;
}
.big {
font-size: 16pt;
line-height: 20pt;
color: red;
}
.float {
background: red;
float: right;
width: 10pt;
height: 10pt;
}
.clear {
clear: both;
width: 20pt;
background: green;
}
</style>
</head>
<body>
<div class="test">
<div class="float"></div><div class="float clear"></div>Hello World, I don't fit in one line.
</div>
<div class="test">
<div class="float"></div><div class="float clear"></div><span class="big">H</span>ello World, I don't fit in one line.
</div>
<div class="test">
Hello World, <div class="float"></div>I<div class="float clear"></div> don't fit in one line.
</div>
<div class="test">
<div class="float"></div><div class="float clear" style="width: 90pt"></div>Hello World, <span class="big">I</span> don't fit in one line.
</div>
</body>
</html>