blob: a42a544d53c7b029868b23bc695e131c99e30e7d [file] [log] [blame]
<!DOCTYPE html>
<title>shape-outside-floats-circle-000-reference.html</title>
<link rel="author" title="Adobe" href="http://html.adobe.com/">
<link rel="author" title="Bem Jones-Bey" href="mailto:bjonesbe@adobe.com">
<meta name="flags" content="ahem dom">
<style>
.container {
position: relative;
font: 20px/1 Ahem, sans-serif;
width: 500px;
height: 200px;
border: 1px solid black;
}
.circle {
width: 160px;
height: 160px;
border-radius: 80px;
border: 1px solid blue;
}
#left-circle-outline {
position: absolute;
z-index: -1;
top: 20px;
left: 0px;
}
#right-circle-outline {
position: absolute;
z-index: -1;
top: 20px;
right: 0px;
}
.left-circle-float-line {
float: left;
clear: left;
height: 20px;
}
.right-circle-float-line {
float: right;
clear: right;
height: 20px;
}
</style>
<body>
<p>The black squares should trace the right side of the circle's blue outline.</p>
<div class="container">
X<br/>
<div id="left-circle-outline" class="circle"></div>
<!-- generated left-rounded-rect-float-line divs will be inserted here -->
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X
</div>
<p>The black squares should trace the left side of the circle's blue outline.</p>
<div class="container" style="text-align: right">
X<br/>
<div id="right-circle-outline" class="circle"></div>
<!-- generated right-rounded-rect-float-line divs will be inserted here -->
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X
</div>
<script src="resources/rounded-rectangle.js"></script>
<script src="resources/subpixel-utils.js"></script>
<script>
// Note that the border must be added into the width to account for its
// affect on float positioning.
genLeftRightRoundedRectFloatShapeOutsideRefTest({
roundedRect: {x: 0, y: 20, width: 161, height: 160, rx: 80, ry: 80},
containerWidth: 500,
containerHeight: 200,
lineHeight: 20,
floatElementClassSuffix: "circle-float-line",
insertElementIdSuffix: "circle-outline"
});
</script>
</body>