summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/flex-minimum-size-001.html
blob: c2eea80ca5b79818f6b7a9a36ab1ff64826b5218 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<title>CSS Flexbox: flexbox with min-size: auto</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-direction-property">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-basis-property">
<link rel="bookmark" href="https://crbug.com/426898">
<link href="support/flexbox.css" rel="stylesheet">
<meta name="assert" content="Flexbox with min-size: auto is handled correctly.">

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

<style>
.flexbox {
    width: 10px;
    height: 10px;
    background-color: grey;
}

.item {
    background-color: red;
    margin: 5px;
}

.child {
    height: 100px;
    width: 100px;
    background-color: green;
}

.width-20 {
    width: 20px;
}

.flex-basis-20 {
    flex-basis: 20px;
}

</style>

<body onload="checkLayout('.flexbox, .inline-flexbox');">
<div id=log></div>

<div class="flexbox" data-expected-width="10">
    <div class="item" data-expected-width="100">
        <div class="child" data-expected-width="100"></div>
    </div>
</div>

<div class="flexbox column" data-expected-height="10">
    <div class="item" data-expected-height="100">
        <div class="child" data-expected-height="100"></div>
    </div>
</div>

<div class="inline-flexbox column" data-expected-height="110">
    <div class="item flex-basis-20" data-expected-height="100">
        <div class="child" data-expected-height="100"></div>
    </div>
</div>

<div class="flexbox" data-expected-width="10">
    <div class="item width-20" data-expected-width="20">
        <div class="child" data-expected-width="100"></div>
    </div>
</div>

<div class="flexbox" data-expected-width="10">
    <div class="item flex-basis-20" data-expected-width="100">
        <div class="child" data-expected-width="100"></div>
    </div>
</div>

<div class="inline-flexbox" data-expected-width="110">
    <div class="item flex-basis-20" data-expected-width="100">
        <div class="child" data-expected-width="100"></div>
    </div>
</div>