summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-intrinsic-sizes.html
blob: 45d607357394e6f0bae11b445f851cf5617085f1 (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
<!DOCTYPE html>

<link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel="stylesheet">
<link href="../css-intrinsic-dimensions/resources/height-keyword-classes.css" rel="stylesheet">
<link href="resources/grid.css" rel="stylesheet">

<style>
.container {
    width: 100px;
    height: 100px;
}

.grid {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

div { font: 10px/1 Ahem; }

</style>

<script src="../../resources/check-layout.js"></script>

<body onload="checkLayout('.grid')">

<p>This test checks that fr tracks are properly sized whenever grid have intrinsic sizes.</p>

<div class="container">
  <div class="grid" data-expected-width="100" data-expected-height="10">
    <div>XXX XXX</div>
  </div>
</div>

<!-- This fails due to https://code.google.com/p/chromium/issues/detail?id=547762 -->
<div class="container">
  <div class="grid min-content" data-expected-width="30" data-expected-height="10">
    <div>XXX XXX</div>
  </div>
</div>

<div class="container">
  <div class="grid max-content" data-expected-width="70" data-expected-height="10">
    <div>XXX XXX</div>
  </div>
</div>

<div class="container">
  <div class="grid fit-content" data-expected-width="70" data-expected-height="10">
    <div>XXX XXX</div>
  </div>
</div>

<div class="container">
  <div class="grid fill-available" data-expected-width="100" data-expected-height="100">
    <div>XXX XXX</div>
  </div>
</div>

</body>