Add layout behavior for float: left/right with FloatContext tracking, clear property support, shrink-to-fit width, block-level float avoidance, float-aware inline line breaking, and BFC height expansion for overflow:hidden containers. Includes 20 golden tests and comprehensive unit/parser tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
396 B
HTML
23 lines
396 B
HTML
<html>
|
|
<head>
|
|
<style>
|
|
.float-right {
|
|
float: right;
|
|
width: 150px;
|
|
height: 60px;
|
|
background-color: #0000ff;
|
|
}
|
|
.clear-right {
|
|
clear: right;
|
|
background-color: #00ff00;
|
|
padding: 10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="float-right"></div>
|
|
<p>Some text next to the float</p>
|
|
<div class="clear-right">This clears the right float and appears below it</div>
|
|
</body>
|
|
</html>
|