summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/table-with-percent-intrinsic-width.html
blob: e0cd66dd8402105636ba41f70736fbc84a81b0f2 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html>
<head>
<title>CSS Flexbox: table descendants</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1123100">
<meta name="assert" content="Percentage sized flex table does not use percent for intrinsic, or layout size.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
  .container {
    display:flex;
    width: 200px;
  }
  .left {
    width:200px;
    background:yellow;
  }
  main table {
    border-spacing: 0;
    background: red;
  }
  .spacer {
    display:inline-block;
    width: 10px;
    height: 10px;
    background: green;
  }
  main td {
    padding: 0;
  }
</style>
</head>
<body>
<main>
<div class="container">
  <div class="left">
  </div>
  <table style="width:100%" data-expected-width=100>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
  </table>
</div>

<div class="container">
  <div class="left">
  </div>
  <table style="width:70%; flex-basis: 200px" data-expected-width=100>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
    <td data-expected-width=20><div class="spacer"></div><div class="spacer"></div></td>
  </table>
</div>
</main>
<div id=log></div>

<script>
  checkLayout("table");
</script>
</body>
</html>