Per spec, float positioning and stacking is not affected by defining a float area with a shape. https://drafts.csswg.org/css-shapes/#relation-to-box-model-and-float-behavior So all the call sites of GetFloatAvailableSpace() related to adding a float are replaced by GetFloatAvailableSpaceForPlacingFloat(). <shape-box> with border-radius will be implemented in next part. MozReview-Commit-ID: 1RXEeXDhdWo
55 lines
1.3 KiB
HTML
55 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
|
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
|
|
|
<html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Shape Test: float left, margin-box reference</title>
|
|
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
|
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
|
<style>
|
|
.container {
|
|
width: 200px;
|
|
line-height: 0;
|
|
}
|
|
|
|
.shape {
|
|
float: left;
|
|
/* Omit shape-outside: margin-box; */
|
|
box-sizing: content-box;
|
|
height: 25px;
|
|
width: 25px;
|
|
padding: 25px;
|
|
border: 25px solid lightgreen;
|
|
margin: 25px;
|
|
background-color: orange;
|
|
}
|
|
|
|
.box {
|
|
display: inline-block;
|
|
width: 25px;
|
|
height: 25px;
|
|
background-color: blue;
|
|
}
|
|
</style>
|
|
|
|
<body class="container">
|
|
<div class="shape"></div>
|
|
<div class="shape"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
<div class="box"></div>
|
|
</body>
|
|
</html>
|