Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS stretch(): minimum and maximum block sizes</title>
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<meta name="assert" content="stretch() in min-height and max-height fits the margin box of an in-flow box to its argument.">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.column {
float: left;
width: 25px;
height: 200px;
}
.test {
background: green;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="column"><div class="test" style="height: 10px; min-height: stretch(150px); margin-bottom: 50px;"></div></div>
<div class="column"><div class="test" style="height: 200px; max-height: stretch(150px); margin-bottom: 50px;"></div></div>
<div class="column"><div class="test" style="height: 10px; min-height: stretch(100px); padding-bottom: 20px;"></div></div>
<div class="column"><div class="test" style="height: 200px; max-height: stretch(100px); border-bottom: 20px solid green;"></div></div>