Preserve geometric float clearance endpoints
This commit is contained in:
1 parent
6d0f884ee0
commit
79dba60fae
4 files changed
+254
-68
No files matched your search
@@ -222,6 +222,11 @@
|
||||
{"name": "same-side floats remain adjacent", "color": "#1971c2", "x": 80, "y": 0, "width": 80, "height": 30},
|
||||
{"name": "trailing right float shares the band", "color": "#e8590c", "x": 340, "y": 0, "width": 60, "height": 30}
|
||||
],
|
||||
"nested-float-clearance": [
|
||||
{"name": "earlier tall float keeps its full shared-BFC endpoint", "color": "#087f5b", "x": 0, "y": 0, "width": 120, "height": 100},
|
||||
{"name": "later shorter descendant float shares the remaining band", "color": "#1971c2", "x": 120, "y": 20, "width": 200, "height": 50},
|
||||
{"name": "clearfix advances following flow below the tallest float", "color": "#862e9c", "x": 0, "y": 100, "width": 600, "height": 20}
|
||||
],
|
||||
"modern-hydration-contracts": [
|
||||
{"name": "modern hydration contracts", "color": "#16803c", "width": 360, "height": 90}
|
||||
],
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>nested float clearance keeps the tallest shared-BFC endpoint</title>
|
||||
<style>
|
||||
html, body { margin: 0; }
|
||||
.container { width: 600px; }
|
||||
.header-float {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 100px;
|
||||
background: #087f5b;
|
||||
}
|
||||
.collapse::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
.nested-float {
|
||||
float: left;
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
margin-top: 20px;
|
||||
background: #1971c2;
|
||||
}
|
||||
.following {
|
||||
width: 600px;
|
||||
height: 20px;
|
||||
background: #862e9c;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header-float"></div>
|
||||
<div class="collapse"><div class="nested-float"></div></div>
|
||||
<div class="following"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user