summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-sizing/slice-intrinsic-size.html
blob: 05ce6e46304adda6aab773147e8a32d2564680b6 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<head>
  <title>CSS Test: min/max-content size on box-decoration-break:slice inline box</title>
  <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
  <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content">
  <link rel="help" href="https://drafts.csswg.org/css-break-3/#break-decoration">
  <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1552357">
  <link rel="match" href="slice-intrinsic-size-ref.html">
<style>
html,body {
  color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}

div {
  border: 5px solid blue;
}
.max > div {
  width: max-content;
}
.min > div {
  width: min-content;
}

span {
  border: 2px solid gray;
  padding: 0 10px 0 6px;
  border-width: 0 8px 0 5px;
  margin: 0 4px 0 3px;
  background: yellow;
  /* for clarity: */
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div>
  <span>aaa</span><span>aaa</span>
</div>
<div>
  <span>aaa</span>aa<span>aaa</span>
</div>
<div>
  <span>aaa</span> <span>aaa</span>
</div>
<div>
  <span>aaa </span><span>aaa</span>
</div>
<div>
  <span>aaa</span><span> aaa</span>
</div>
<div>
  <span>aaa</span> aa<span>aaa</span>
</div>
<div>
  <span>aaa </span>aa<span>aaa</span>
</div>
<div>
  <span>aaa</span>aa<span> aaa</span>
</div>
<div>
  <span>aaa</span> aa <span>aaa</span>
</div>
<div>
  <span>aaa</span>aa <span>aaa</span>
</div>
<div>
  <span>aaa</span>aa </div>
</f>

<f class="min">
<div>
  <span>aaa</span><span>aaa</span>
</div>
<div>
  <span>aaa</span>aa<span>aaa</span>
</div>
<div>
  <span>aaa</span> <span>aaa</span>
</div>
<div>
  <span>aaa </span><span>aaa</span>
</div>
<div>
  <span>aaa</span><span> aaa</span>
</div>
<div>
  <span>aaa</span> aa<span>aaa</span>
</div>
<div>
  <span>aaa </span>aa<span>aaa</span>
</div>
<div>
  <span>aaa</span>aa<span> aaa</span>
</div>
<div>
  <span>aaa</span> aa <span>aaa</span>
</div>
<div>
  <span>aaa</span>aa <span>aaa</span>
</div>
<div>
  <span>aaa</span>aa </div>
</f>