File: flex-minimum-width-flex-items-014.html

package info (click to toggle)
thunderbird 1%3A91.12.0-1~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,008,300 kB
  • sloc: cpp: 6,084,052; javascript: 4,790,441; ansic: 3,341,486; python: 862,958; asm: 366,542; xml: 204,277; java: 152,477; sh: 111,376; makefile: 21,388; perl: 15,312; yacc: 4,583; objc: 3,026; lex: 1,720; exp: 762; pascal: 635; awk: 564; sql: 453; php: 436; lisp: 432; ruby: 99; sed: 69; csh: 45
file content (81 lines) | stat: -rw-r--r-- 2,171 bytes parent folder | download | duplicates (8)
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
81
<!DOCTYPE html>
<title>CSS Flexbox: Proper min-width intrinsic size with display: flex</title>
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-containers">
<link rel="help" href="https://www.w3.org/TR/CSS2/visudet.html#min-max-widths">
<meta name="assert" content="This test checks that min-width intrinsic size still applies if a fixed width is set.">
<style>
.min-content {
    width: 10px;
    min-width: -webkit-min-content;
    min-width: -moz-min-content;
    min-width: -ie-min-content;
    min-width: -o-min-content;
    min-width: min-content;
    outline: 2px solid;
    display: flex;
    flex-wrap: wrap;
}
.max-content {
    width: 10px;
    min-width: -webkit-max-content;
    min-width: -moz-max-content;
    min-width: -ie-max-content;
    min-width: -o-max-content;
    min-width: max-content;
    outline: 2px solid;
    display: flex;
    flex-wrap: wrap;
}
.fit-content {
    width: 10px;
    min-width: -webkit-fit-content;
    min-width: -moz-fit-content;
    min-width: -ie-fit-content;
    min-width: -o-fit-content;
    min-width: fit-content;
    outline: 2px solid;
    display: flex;
    flex-wrap: wrap;
}
.child {
    width: 20px;
    height: 20px;
    background-color: pink;
}
div {
    display: inline-block;
    line-height: 0;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>

<body onload="checkLayout('body > div')">
<div id=log></div>

<div class="min-content" data-expected-width=20>
    <div class="child"></div><div class="child"></div>
</div>

<div class="max-content" data-expected-width=40>
    <div class="child"></div><div class="child"></div>
</div>

<div class="fit-content" data-expected-width=40>
    <div class="child"></div><div class="child"></div>
</div>

<div style="width: 30px">
    <div class="fit-content" data-expected-width=30>
        <div class="child"></div><div class="child"></div>
    </div>
</div>

<div style="width: 10px">
    <div class="fit-content" data-expected-width=20>
        <div class="child"></div><div class="child"></div>
    </div>
</div>

</body>