summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/normal-flow/auto-margins-used-values.html
blob: d4c7ac3f01aea0a5c5705f0a370f0a3851b36b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#blockwidth">
<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;
}
</style>
<body onload="checkLayout('.box')">
  <div class="container">
    <div class="box" style="margin: auto;" data-expected-margin-left="25" data-expected-margin-right="25"></div>
    <div class="box" style="margin-left: auto;" data-expected-margin-left="50" 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="box" style="margin: auto;" data-expected-margin-left="25" data-expected-margin-right="25"></div>
    <div class="box" style="margin-left: auto;" data-expected-margin-left="50" 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>