Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that disables it given conditions:
- (os == "mac") and (os_version == "14.70") and (processor == "x86_64") and not debug : Bug 1931094
- (os == "mac") and (os_version == "14.70") and (processor == "x86_64") and debug : Bug 1931094
- This test has a WPT meta file that expects 6 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/CSS2/normal-flow/auto-margins-used-values-with-floats.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.container {
display: flow-root;
width: 100px;
padding: 5px;
box-sizing: border-box;
}
.box {
display: flow-root;
width: 40px;
height: 10px;
background: lime;
}
.float {
float: right;
width: 20px;
height: 40px;
background: cyan;
}
</style>
<body onload="checkLayout('.box')">
<div class="container">
<div class="float"></div>
<div class="box" style="margin: auto;" data-expected-margin-left="15" data-expected-margin-right="35"></div>
<div class="box" style="margin-left: auto;" data-expected-margin-left="30" data-expected-margin-right="0"></div>
<div class="box" style="margin-right: auto;" data-expected-margin-left="0" data-expected-margin-right="50"></div>
</div>
<div class="container" style="direction: rtl;">
<div class="float"></div>
<div class="box" style="margin: auto;" data-expected-margin-left="15" data-expected-margin-right="35"></div>
<div class="box" style="margin-left: auto;" data-expected-margin-left="30" data-expected-margin-right="0"></div>
<div class="box" style="margin-right: auto;" data-expected-margin-left="0" data-expected-margin-right="50"></div>
</div>
</body>