Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-flexbox/intrinsic-size/col-wrap-005.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<meta name="assert"
content="The item still has sufficient available size at the time fit-content is resolved. (A bug in the code could cause the right-most item to have a width of 75px.)">
<style>
.item {
/* Remove min-height so we don't have to think about it. */
min-height: 0px;
flex: 0 0 100px;
outline: 1px solid;
}
.grandchild {
width: 75px;
float: left;
}
</style>
<div
style="display: flex; flex-flow: column wrap; width: max-content; height: 100px; background: green; position: relative;"
data-expected-width="250">
<div class="item" style="width: 100px;"></div>
<div class="item" style="width: fit-content;" data-expected-width="150"
data-offset-x="100">
<!-- This item has min-content=75 and max-content=150. -->
<div class="grandchild"></div>
<div class="grandchild"></div>
</div>
</div>
<script>
checkLayout('body > div');
</script>